| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | nodelist lookup batch |
Hi! Lee,
On 27 Aug 08 00:02, you wrote to Gord Hannah:
LG> -> PQ> Well, if it makes you feel better I've found it doesn't like
LG> 2:2/2 -> PQ> as well. :)
LG> -> Wonder about 3:3/3, 4:4/4, or 5:5/5?
LG> I think its the colon that is throwing your batch file off.
It's not really the problem. In fact the colon is used as an additional
target 'separator', to separate out the individual bits of a Fidonet
address (with NSET) to environment variables, like so (in the batch):
-----88-----
[ ...]
:: Extract the zone number from the input...
ECHO %1|NSET /P1 /X: ZONE=$1
:: Separate the net # (or region #) -and- node # (i.e. 999/9999)...
ECHO %1|NSET /P2 /X: NETNODE=$1
:: Grab the net # or region #...
ECHO %NETNODE%|NSET /P1 /X/ NETREGON=$1
:: Extract the node #...
ECHO %1|NSET /P2 /X/ NODENUM=$2
[ ...]
-----88-----
The percent identifier above (%1) is a Fido address in the form:
9:999/9999, supplied as a parameter when the batch is executed. The above
scrap just pulls the requested address to bits to be tested and used. Only
the bits are used later, not the whole address.
LG> The colon is an illegal label character. with regards to batch files,
LG> a DOS "label" is a word or a series of numbers/characters used to
LG> identify a part of a batch file. Some people use a single colon to
LG> place remarks in a batch file, but since DOS uses this to identify its
LG> labels and those lines will be read, I suggest the single colon not be
LG> used, except of course, as a label precursor
LG> ie:
LG> goto end
LG> :end
A double-colon (::) works better and faster for making remarks, since DOS
sees it as an error condition (bad label) and ignores the rest of the line.
A line beginning with REM is -still- parsed by DOS and acted upon if it
contains useful-to-DOS text, like redirection symbols ('').
I like using whitespace remarking as well, a lot:
-----88-----
[ ... ]
GOTO USE_ZONE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PLACE ADVERTISEMENT HERE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:USE_ZONE
[ ... ]
-----88-----
=:)
BTW, you helped me sort out the problem. In another version of this note,
I started to frame an explanation of what goes on in the batch and
discovered where the apparent problem actually was. It's always a
GoodThing(tm) to have someone else to mouth-off to about an ongoing
problem. No one here would understand what I'm saying nor have the
requisite patience. In this case, it was you. Thank you. :)
Cheers,
Paul.
... General failure reading drive A: Please remove your fist.
--- GoldED+/LNX 1.1.5-31012
* Origin: Quinn's Post - Maryborough, Queensland, OZ (3:640/384)SEEN-BY: 633/260 267 640/384 954 1674 712/0 104 313 848 800/445 @PATH: 640/384 954 712/848 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.