Please enable JavaScript to view this site.

STRSIZ <numeric constant>

The STRSIZ statement establishes the default length of string variables, applicable to any non-mapped string seen by the compiler from that point forward. The default STRSIZ value is 10. For example:

STRSIZ 100

Traditionally it also set the limit on the length of SWITCH and CASE statement arguments, as well as any string arguments to functions and procedures that were not explicitly declared with an "as" clause. These rules were relaxed somewhat in A-Shell version 6.5; see History below for details.

History

2018 January, A-Shell 6.5.1624, compiler edit 845: 

In the absence of an explicit "as s#" clause, string arguments to functions and procedures, as well as the return value of a string function, now defaults to s0 (i.e. dynamic, unlimited) instead of the current STRSIZ.
STRSIZ 0 now sets the default string size to dynamic, as would be expected. Previously it set the default string size to a fixed length of zero, i.e.  making it impossible for any unmapped string variable to hold a value.
SWITCH and CASE arguments are no longer limited by the current STRSIZ. Previously the compiler would complain about it you were forced to actually change the STRSIZ to accommodate them, which was not very programmer-friendly.

Note that all of the above are purely compiler adjustments, i.e. they change the resulting RUN programs, which are backward compatible as least as far back as 6.0.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software