Converting a substitution value to a string variable

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Converting a substitution value to a string variable

Post by Susan Smith »

Hi all,

Is there a way to load the value of a substitution value into a regular string variable? In my menu program, I do this:

00100 EXECUTE "CONFIG SUBSTITUTE [USERCODE] "&USERNO$

So, STATUS SUBS returns
[USERCODE] 45 (or some other two-digit code)

[USERCODE] is used all over my system and in a few cases, I need to write it to a data file. How can I get its value into a string? Do I have to parse the STATUS SUBS results? (Please tell me no...)

-- Susan
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

Nevermind. I think the easiest thing to do is that in the same program in which I do the CONFIG SUBSTITUTE [USERCODE] command, I should also set an ENV$ variable called USERCODE. Then I have the best of both worlds. (I think.)
Post Reply