Re: Variable naming



Dario D. wrote:
Hello all,

Is slash (/) allowed in variable names? I'm reading a tutorial on the NS2 simulator, and it appears to be using slashes in class names:

set tcp [new Agent/TCP]
[...]

Others have mentioned how to get slashes into variables names. However, that "Agent/TCP" is not a variable name ("tcp" is the variable name) -- it is the name of a class in whatever object system NS2 uses. As far as Tcl is concerned, this name is just a string and can contain pretty much any character.

-- Neil
.



Relevant Pages

  • Re: How to replace path slash character delimiters, when saving fi
    ... the slash delimiters are still there. ... the folder name, the slashes are automatically removed, and a little yellow ... > a filename, so I also dont need all the fuss that goes with it."- meaning ... >> Just use Favorites | Add to Favorites. ...
    (microsoft.public.windowsxp.general)
  • Re: Problem creating computer accounts in OU containing a fwd slash ("
    ... I did come across that article (until I did, I had been suspecting that forward slashes simply weren't legal/correct for OU names, which made me wonder why ADUC had allowed it). ... I tried renaming the OU so that it doesn't have a slash and the problem went away, then added it back and the problem returned - so that seems to pretty well isolate it. ... However, it would appear that something behind the scenes in AD that defines the join ACLs after creating the account isn't set up to do this kind of escaping, and so the computer path it tries to use for that operation fails. ...
    (microsoft.public.windows.server.active_directory)
  • Re: why there is // ?
    ... only if no alias is already set ... The double slashes are a common off-by-1 mistake. ... slash, it is usually error-prone, as in the first command. ... they make quite a difference when setting environment variables ...
    (comp.unix.shell)
  • Re: why there is // ?
    ... The double slashes are a common off-by-1 mistake. ... slash, it is usually error-prone, as in the first command. ... POSIX 1003.2 "4.11 Pathname Resolution" states: ... Trailing slashes were and still are useful to force the ...
    (comp.unix.shell)
  • Re: [PATCH] reiserfs: fix handling of device names with /s in them
    ... The generic block device code ... Your patch handles at most one slash. ... But the description mentions 'slashes' ... Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org ...
    (Linux-Kernel)