Resolving strings

3 views
Skip to first unread message

Stuart Allen

unread,
Nov 6, 2011, 6:52:47 PM11/6/11
to jacl-discuss
In order to get a new forms library I am making to work properly I
have also added a new language feature. This is the ability to prefix
a string variable with a percent sign to indicate that it should be
resolved into its contents recursively - ie. as many times as is
needed until it resolves into a plain string.

For example:

constant title "Mr" "Mrs" "Ms" "Miss"

string buffer
integer index

set index = 1

setstring buffer "title[" INDEX "]"

write "buffer"

will print "buffer"

write buffer

will print "title[1]"

write %buffer

will print "Mr"


Regards,
Stuart
Reply all
Reply to author
Forward
0 new messages