You do need the #push for every variable. It is not there in the fragment you included in your post.
I imagine it was there in a more complete version of the code, though I did not go back to look for it.
I am not sure which pound sign you mean could be omitted. Some TACL commands can be written both with the #
and without it. I do not know why TACL has two spellings of some of its commands.
2. Why do I must use the pond sign for the set command?
I believe you could use either "#set" or "set variable" in this example. You cannot use just "set"
because TACL has several other set commands (set define, set defmode, etc.), so just "set" by itself is
not accepted.
3. What's the significance of using the param command? It seems to me sometimes I must use this construct [#rundate] and
sometimes not (in the example above, it didn't use the pond sign in front of rundate.
PARAM is used to create an item that TACL sends to a new process when TACL starts a new process. Ordinary TACL
variables do not get sent to a new process. The items created by PARAM can send parameters to the new process
that it can read to control decisions made in the program.
I do not see [#rundate] or [rundate] in the part of the example you posted. Maybe one of them was used in a more
complete version. Since "rundate" is the name of a user-created TACL variable, you would not put a pound sign
in front of it.
The pound sign is just part of the name of some TACL commands or TACL built-in variables. It is not a TACL operator
or TACL function. You use the pound sign when it is is part of the name of the TACL command or TACL built-in variable
you want to use. I guess you are confused because some TACL commands have two names -- one with the pound sign and
one without the pound sign. Those are just two names for the same command.
You did not seem to ask about this, but let me mention that square brackets ( [] ) are used to enclose a series of
TACL symbols that should be evaluated as a group, then the result of that evaluation is substituted for the square
brackets and everything enclosed by them. When square brackets are nested within other square brackets, the inner
group is evaluated first. If you ever get confused about how a complex TACL expression is evaluated, it is a pretty
simple rule:
- read the TACL line from left to right until you encounter a right square bracket ( "]" ).
- find the first right square bracket ( "[" ) to the left of the "]".
- evaluate what is between those two square brackets.
- put the result of the evaluation in place of what you just evaluated.
- go back to the beginning of the line and repeat.
I am omitting some details from the above description that are important when defining functions, but this will do
for most common situations.
Good luck!