[sac-user] Strings and StringArrays

Bullington, Michael michael.bullington at ttu.edu
Wed May 5 00:54:56 CEST 2010


To whom it shall concern:

May anybody explain to me the difference between the string "type" and the stringArray "type"?

I am trying to build a string tokenizer.  So far, I have been able to build one in SAC that resembles more of C code than SAC (see attached).  Also, the code does not generate an array of strings.  I would like to use either the set notation or with-loop notation to create an array of strings.

The restrictions on this code is that the string must have exactly one blank space both before and after the string and exactly one blank space between words in the string.  Also, no punctuation and no other whitespace (for example, tabs) are allowed to be in the string.

I reviewed through the SAC stdlib modules for String.sac and StringArray.sac for ideas.  Also, I cannot find any information on the String and StringArray topics in the Tutorial PDFs.

Finally, unless I restrict the "use" statement to specific function names, any attempts at using the String or StringArray modules tend to cause errors in compilation because of duplicate declarations or complications with the Array or StdIO modules.  For the Array module, one possible idea could be to omit the "use Array:..." statement and then code "Array::..." where needed in the program.  Does the "use" statement have any other syntax besides "use <moduleName>: all;" and "use <moduleName>: {<functionList>};" to make module usage easier?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tokenizer.sac
Type: application/octet-stream
Size: 384 bytes
Desc: tokenizer.sac
URL: <http://lists.sac-home.org/pipermail/sac-user/attachments/20100504/087ad8de/attachment-0002.obj>


More information about the sac-user mailing list