Re: Text environment



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

.



Relevant Pages

  • Re: Pompeii - First Thoughts with Spoilers
    ... Water pistol ... I viewed the story today and thought the modern slang ... but having all your period characters ... enough time to the environment, and the quick-zoom direction was off- ...
    (rec.arts.drwho)
  • Re: Environment limit on NT
    ... the 'system' command seems to be exitting abruptly. ... common observation is around 6000 characters) and when another ... when I run a perl script containing just the following: ... Is there a limit on the length of an environment ...
    (perl.beginners)
  • Re: Environment limit on NT
    ... the 'system' command seems to be exitting abruptly. ... common observation is around 6000 characters) and when another ... when I run a perl script containing just the following: ... Is there a limit on the length of an environment ...
    (perl.beginners)
  • Re: problem with java, ASCII and Linux
    ... you have a problem with non-ASCII characters. ... ASCII is US-ASCII, ... Appears that you have some partially utf-8 -based environment. ... to your Java VM which character encoding is used by your terminal ...
    (comp.infosystems.www.servers.unix)
  • Re: SETDOS /X-4-6
    ... 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 is the context. ... As I already wrote, GOSUB and FOR variables in 4DOS are not stored in the environment but temporary stored in memory, and their lifetime is only during the command. ... Nor they are preceded by control characters, with the exception of the single-character FOR variables. ...
    (comp.os.msdos.4dos)