🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #8723

Re: Clipper - DOS variable help needed.

#8723
From: shawn.r.antol
Date: Tue, 16 Jan 1990 22:38
46 lines
1579 bytes
In article <Jan.10.14.08.52.1990.10441@elbereth.rutgers.edu>, ssdesai@elbereth.rutgers.edu (Sunil S. Desai) writes:

> I have Funcky and NetLib clipper libraries.  Funcky does not have any
> functions to access DOS variables.  NetLib has a Whoami function that
> can return the user's login name but I am trying to avoid extra overhead
> of linking NetLib library for just one function. 

One way I have accessed the USER ID is to have the autoexec.bat file
pass the station ID to the Clipper EXEcutable file.  

This is what your main.prg file would look like before compiling:

	Parameters  user_id
	clear
	if type("user_id") = "U"
		user_id = "Un-Known"
	endif
	@ 10,10 say "Welcome " + user_id
	quit
	
The autoexec.bat would look something like this:

path c:\;c:\dos
split			; set DOS error level to the station ID
if errorlevel 1 goto serv1
if errorlevel 2 goto serv2
	:
	:
if errorlevel x goto servx
:serv1
main TERM1
goto exit
:serv2
main TERM2
goto exit
	.
	.
	.
:exit


Shawn R. Antol
AT&T Bell Labs
Naperville, IL.
708-979-5622
Reply to:	att!ihlpb!santol
Technical Details
Message-ID: <12877@cbnewsc.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!cbnewsc!santol
References: <Jan.10.14.08.52.1990.10441@elbereth.rutgers.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!cbnewsc!santol
From: santol@cbnewsc.ATT.COM (shawn.r.antol)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Clipper - DOS variable help needed.
Summary: Here is one way to do it...
Keywords: Clipper, DOS
Message-ID: <12877@cbnewsc.ATT.COM>
Date: 16 Jan 90 22:38:18 GMT
References: <Jan.10.14.08.52.1990.10441@elbereth.rutgers.edu>
Organization: AT&T Bell Laboratories
Lines: 46