Previous Thread
Next Thread
Print Thread
Username in Fn'Sprintf$ #29049 21 May 18 03:17 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
Hello,

Fn'Sprintf$ has the ability to substitute in the username with %u, but it uses the Windows/ATE username. We need the actual username in A-Shell. I was going to add another format code to our copy of Fn'Sprintf$, but thought it might be something other developers would value. Jack, would you be willing to let this change come into the soslib repo? If so, I was wondering if anyone had any suggestions on what the syntax/format code should be?

Thanks,
John Andreasen

Re: Username in Fn'Sprintf$ #29050 21 May 18 05:27 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I'm glad to see someone using the SOSLIB and taking the trouble to suggest improvements!

Indeed, %u returns the Windows/ATE username (if applicable). After reviewing the code and your suggestion, I decided to just go ahead and implement a new variable %l (perhaps suggesting the mnemonic "login") which ignores the Windows/ATE login and returns the A-Shell application/server login. (I made a few other minor improvements and cleanups at the same time.)

I've posted the updated fnsprintf.bsi to the SOSLIB repository. (The first link will only be valid until the next update; but the second link should be reasonably permanent, from which point you can drill down to the 907010 directory and fnsprintf.bsi file.)

Re: Username in Fn'Sprintf$ #29051 21 May 18 05:59 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
Thank you! It is great that something like the SOSLIB exists. It is a great community resource. Our goal was to use this in logging, so this will work well.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3