[slang-users] advantage of $1 over a variable

jmrobert5 at mchsi.com jmrobert5 at mchsi.com
Thu Jun 23 10:16:49 EDT 2005


Depends on what system you are looking at.

Many shells and perl use those names a special variables, usually as function
inputs.  In Bash, args passed to a function are kept in $1, $2, etc.

I remember when Fortran had only 2 letter var names, AA, AB, AC, etc.

Humorously, $0-$9 limits you to 10 vars, where $a-$Z is 52!  :^)

I remember a customer program that had:
param
nextparam
nextnextparam

--
Joe Robertson
jmrobert5 at mchsi.com
http://home.mchsi.com/~jmrobert5/




More information about the slang-users-l mailing list