Re: string handle problem



Bryan Oakley wrote:
> slebetman@xxxxxxxxx wrote:
>
> >>
> >>What platform are you on? This MIGHT be doable using the [file tail]
> >>command, or some other variant of file..
> >>
> >
> >
> > I think it should work regardless of platform. Remember that Tcl
> > normalises file paths to slashes on all platforms.
> >
>
> Though, while it would likely work, it would yield code that is slightly
> more difficult to understand. As a general rule, one should avoid using
> commands on a datatype that were designed for some other datatype, just
> because they happen to work.

Everything's a string ;-) Though I see what you mean.

I think the [lindex [split $x "/"] end] method is simplest (don't know
why the OP think it's complicated compared to regexp). I was just
commenting on the "what platform" and "MIGHT be doable" comment. It IS
doable on any platform.

.



Relevant Pages

  • Re: Having Assembly entrypoint in DLL library
    ... The 'execution unit' is what you are really working on. ... The command line processing and everything else just lets you drive you ... The 'Platform' decouples the 'Static side effects' of a static Mainentry ... instantiate an 'Assembly Platform' class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: string handle problem
    ... command, or some other variant of file.. ... I think it should work regardless of platform. ... normalises file paths to slashes on all platforms. ...
    (comp.lang.tcl)
  • Re: The name of script itself
    ... There may be a better command than ... portable to any platform that has an internet connection (so can get the ... GAWK source code) and a C compiler ... original argv array, before GAWK had done any processing on it. ...
    (comp.lang.awk)
  • Re: Rebuilding part of NK.bin: Possible?
    ... You can build from any point in your platform tree from the command line ... If you have the WINCEREL environment variable set, ... avoiding the 10-20 min rebuild process or minimizing it. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: main function
    ... These might be routines which are executed to emulate in software C features for which native hardware support is lacking on a particular platform, such as long-double _Complex arithmetic on a platform which has native support only for 8-bit integer arithmetic. ... What you call from the command line is the entire program, which eventually results in a call to main; and later on, it eventually may result in a call to any of the other user-defined functions in the program. ...
    (comp.lang.c)