~o|16 ~?!i&32768 ~o=7 ~o|32 ~$>end_of_copyright ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~/Copyright (C) Heinz Spiess, CH-2558 Aegerten, 1997. All rights reserved. ~/ ~/The right to use this macro is granted to all EMME/2 users, provided the ~/following conditions are met: ~/ 1) The macro cannot be sold for a fee (but it can be used and distributed ~/ without charge within consulting projects). ~/ 2) The user is aware that this macro is not a part of the EMME/2 software ~/ licence and there is no explicit or implied warranty or support ~/ provided with this macro. ~/ 3) The comments in this macros must not be removed and any additions or ~/ modification must be appropriately identified as such and give at least ~/ date, name and the reason of the modification. ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~:end_of_copyright ~z=%0% ~/*************************************************************************** ~/ LISTSCAL 1.0 - List one or several ranges of scalars ~?z>1 ~$>start ~/ This macro lists the specified ranges of scalars either on the screen ~/ or into afile specified with the -o option ~/ ~/ (Heinz Spiess, Haldenstrasse 16, CH-2558 Aegerten, Switzerland 97-05-29) ~/ ~/ Calling sequence: ~] from1 to1 [from2 to2 ...] ~/ ~/ where: -o optional specification of output file name ~/ starting index of the first range ~/ ending index of the first range ~/ starting and ending indices of second range (optional) ~/ ... ~/ specify more ranges as necessary ~/ ~/ Notes: ~/ - If the from-index is higher than the to-index of a range, the scalars ~/ will be listed in reverse order. ~/ - If the output file specified with the -o option is not empty the ~/ the output will be appended. ~/ ~$>done ~:start ~/*************************************************************************** ~p=2004 ~t1=%1% ~z=0 ~?t1=-o ~+|~t2=%2%|~%|~%|~z=%p% ~:nextrange ~x=%1% ~?x<1 ~+|~/ Invalid range (%1% %2%)!|~$done ~?x>99 ~+|~/ Invalid range (%1% %2%)!|~$done ~y=%2% ~?y<1 ~+|~/ Invalid range (%1% %2%)!|~$done ~?y>99 ~+|~/ Invalid range (%1% %2%)!|~$done ~:nextscalar ~t1=%msx% ~t1=%t1.1% ~?t1=% ~$>not_defined ~/ ms%x_2%: %msx.n_6% %msx.d_40% Value:%msx_10% ~?z=1 (UNIX) ~!echo 'ms%x_2%: %msx.n_6% %msx.d_40% Value:%msx_10%' >>%t2% ~?z=2 (DOS) ~!echo ms%x_2%: %msx.n_6% %msx.d_40% Value:%msx_10% >>%t2% ~:not_defined ~?x>%2% ~+|~x-1|~?!x<%2%|~$nextscalar ~+|~x+1|~?!x>%2%|~$nextscalar ~% ~% ~x=%0% ~?x>1 ~$nextrange ~:done ~/*************************************************************************** s=%t3% batchout=^ ~:end ~o=6