Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Long arguments passed to programs


From   Michael Ingre <[email protected]>
To   <[email protected]>
Subject   st: Long arguments passed to programs
Date   Thu, 08 Jan 2004 10:14:37 +0100

Dear statalist

I'm working on a program that will need to accept long arguments to be
parsed to the programs. Typically, an argument will be several lists of
names separated by a comma (","). The argument will then the be tokenized
into several sub-lists for further processing. This can easily be done in
Stata with strings passed as an argument and then tokenized. However,
strings has a limit (I think) of 244 characters.

program define longarguments
syntax argument(string)

tokenize "`argument'" , parse(",")

....
....  


Is it possible to pass very long arguments (300-1000 characters) to a
program on the commandline? And what is the maximum limit of characters (or
elements) a macro list can hold?

I think I read somewhere that a macro can hold very long lists (like 32768
characters or something) but now I can't find it in the manuals.

Thanks

Michael Ingre

----------------- 
PhD-student 
Department of Psychology
Stockholm University &
National Institute for
Psychosocial Medicine
 





*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index