Something like this:
Process job #1
Gosub Label
Process job #2
Gosub Label
End
Label:
Print a message
Return
http://netnet.net/~swilson/kix/
KiXtart 95 is a logon script processor and/or enhanced batch language for
Windows NT and Windows 95 workstations in a Windows Networking environment.
With it, you can conditionally display information, set environment
variables, start programs, connect to network drives, read or edit the
registry, and/or change the current drive and directory using a free format
'script language'.
At 12:39 PM 10/28/98 -0800, you wrote:
>Does anyone know how to create a gosub strucutre in an NT batch file? Can
>it be done?
>
>Something like this:
>
>Process job #1
>Gosub Label
>Process job #2
>Gosub Label
>End
>
>
>Label:
>Print a message
>Return
>
Glen Forister 530-752-4337 FAX 530-752-1819 gwfor...@ucdavis.edu
Environmental Horticulture Dept., University of California, Davis, CA 95616
Home = 2319 Vernon St., Roseville, CA 95678 916-782-5718 fori...@jps.net
Make sure you use the CALL command so you return to the calling bat file.
Otherwise, you can have the BAT file call itself recursively with different
parameters and test for parameter values (with IF "%1"=="asdfasdf" or IF
%1.==asdfasdf.) and then use GOTO commands--generally a pain. Using CALL
is generally easier.
Another option is to create a loop with a GOTO (several actually) and keep
going thru the loop with lots of value setting & testing. Again, using
CALL is easier.
Regards
Trevor Attema
Code Blue Technologies
In article <3.0.5.32.1998102...@mailbox.ucdavis.edu>,
jmsc...@ucdavis.edu wrote:
> Does anyone know how to create a gosub strucutre in an NT batch file? Can
> it be done?
>
> Something like this:
>
> Process job #1
> Gosub Label
> Process job #2
> Gosub Label
> End
>
> Label:
> Print a message
> Return
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own