#### adding null character to a name (24.4.01)

##### Greg Nash

Adding a null character to a name, shouldn’t aﬀect it’s interpretation:

However, when doing the same thing in a procedure, this same behavior doesn’t seem to apply:

What am I missing?

##### Helmut Kahovec (26.4.01)

Well, you are missing the following (cf. online help page of cat):

”Note that if the result of cat is a name, then it is in fact a global name, even though there might be a local variable of the same name currently active.”

and

”This allows you to make global assignments from within procedures. It illustrates the fact that only global names are returned by cat.”

(the latter being the comment on the last example of that online help page). Thus we have in turn:

##### Robert Israel (29.4.01)

Actually you’re not adding anything to the name. But you can’t construct a local variable inside a procedure. The constructed name refers to the global variable x, not the local variable of the procedure. See my Maple Advisor Database page ?Constructing_names_of_local_variables_and_formal_parameters (http://www.math.ubc.ca/~israel/advisor):

The reason for this behaviour is connected to the way the Maple kernel processes procedure deﬁnitions. Internally, names are used for reference to global variables, but not local variables or formal parameters. For example:

> test3:= proc(x) local v; v:= x+g end:
LOC[1] := args[1] + g