Re: Text environment
- From: "Steve Fabian" <ESFabian@xxxxxxxxxxx>
- Date: Tue, 12 Aug 2008 15:03:21 -0400
Luchezar Georgiev wrote:
| Steve Fabian пишет:
|| There are serious limitations with the internal variable approach.
|| If only one (1) line's worth of data can be saved, you cannot
|| compare files, lines of a single file or of multiple files, nor can
|| you parse the line, use or replace parts of the line, etc - what
|| line 3 of Klaus' example does. So we need to allow the user to
|| assign new values to this entity, and need more than one.
|
| All right - I can try to create an auxiliary (second) text
| environment, dynamically allocated, with the same size as the
| standard environment - but the problem is not this but distinguishing
| between the standard and "text" environment variables. By the way,
| how is this problem solved in other shells?
Control characters are not valid in variable names. That's what makes
storing special variables, e.g. GOSUB formal parameters, in the environment
possible. The parser has to keep track of the current context; the 0x01 as
the first character in GOSUB variable names signals that it is a "very
local" variable; the next character in the name (4NT V8 et seq.) is the
context.
In most other command processor languages the value of a variable does not
become a part of the command, it is treated as data. This makes it possible
for the variable to contain characters that are special characters for the
parser.
|
|| An auxiliary issue: when DO or FOR is used to read the lines of a
|| file, e.g., FOR %X IN (@XYZ.BTM) ... the same rules should apply, at
|| least optionally. Likewise, the results of some functions, esp.
|| @ALIAS[] and @FUNCTION[] often need the "pure" text accessible.
|
| If the text environment is applied to them these issues could be
| solved.
Do you mean a new SETDOS /X option, so that when it is in effect, all DATA
(values of functions and dynamic variables of FOR and DO commands) is
treated as DATA, without being interpreted?
--
Steve
.
- Follow-Ups:
- Re: SETDOS /X-4-6
- From: Luchezar Georgiev
- Re: SETDOS /X-4-6
- References:
- Trigonometric and transcendental functions with @EVAL
- From: lcaverly
- Re: Trigonometric and transcendental functions with @EVAL
- From: lcaverly
- Re: Trigonometric and transcendental functions with @EVAL
- From: Luchezar Georgiev
- Re: Trigonometric and transcendental functions with @EVAL
- From: Klaus Meinhard
- Re: Trigonometric and transcendental functions with @EVAL
- From: Luchezar Georgiev
- Re: Trigonometric and transcendental functions with @EVAL
- From: Steve Fabian
- Re: Trigonometric and transcendental functions with @EVAL
- From: Luchezar Georgiev
- Re: Trigonometric and transcendental functions with @EVAL
- From: Klaus Meinhard
- Re: Text-only (non-expandable) variables
- From: Luchezar Georgiev
- Re: Text-only (non-expandable) variables
- From: Steve Fabian
- Re: Text-only (non-expandable) variables
- From: Steve Fabian
- Reading binary data from a file: @FILEREADB function
- From: Luchezar Georgiev
- Re: Reading binary data from a file: @FILEREADB function
- From: Steve Fabian
- Re: @FILEREADB
- From: Luchezar Georgiev
- Re: @FILEREADB
- From: jayterry@xxxxxxxxxxxxx
- Re: @FILEREADB, _READSTR
- From: Luchezar Georgiev
- Re: @FILEREADB, _READSTR
- From: Klaus Meinhard
- Re: _READSTR (or whatever other name we prefer)
- From: Luchezar Georgiev
- Re: _READSTR (or whatever other name we prefer)
- From: Steve Fabian
- Re: Text environment
- From: Luchezar Georgiev
- Trigonometric and transcendental functions with @EVAL
- Prev by Date: Re: Non-expandable environment variables
- Next by Date: Re: Non-expandable environment variables
- Previous by thread: Re: Variable over-expansion
- Next by thread: Re: SETDOS /X-4-6
- Index(es):
Relevant Pages
|