|
STRING CONCATENATEName:
where <sout> is the name of the resulting string; and <s1> ... <sk> is a list of one or more previously defined strings.
LET STRING S2 = 99 LET STRING S3 = .dat LET SOUT = STRING CONCATENATE S1 S2 S3
LET SINDEX = ^K LET SEXT = .DAT LET FNAME = STRING CONCATENATE FNAME SINDEX SEXT
you need to do
LET FNAME = STRING CONCATENATE FNAME SEXT
LET STRING S1 = file LET STRING S2 = 23 LET STRING S3 = .txt LET SOUT = STRING CONCATENATE S1 S2 S3The resulting string SOUT will contain
. Assume we have variables X and Y in the files "file1.dat" to . "file10.dat" and we want to plot each of these in turn. . LET STRING SBASE = file LET STRING SEXT = xx TITLE CASE ASIS LOOP FOR K = 1 1 10 LET STRING SINDEX = ^K LET FNAME = STRING CONCATENATE SBASE SINDEX SEXT READ ^FNAME Y X TITLE Data from File ^SOUT PLOT Y X DELETE Y X END OF LOOP
Date created: 12/4/2008 |