Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : EXPAND30.ZIP
Filename : EXPSHELL.PRG

 
Output of file : EXPSHELL.PRG contained in archive : EXPAND30.ZIP
* ------------------------------------------------------------------------
* Program......: EXPSHELL.PRG, Demo of EXPAND.LIB.
* Author.......: Pepijn Smits.
* Date.........: May 1991.
* Copyright....: (c)1991, Pepijn Smits.
* Notes........: Clipper 'Demo' program of some Functions of EXPAND.LIB:
* Shell to DOS with new Environment variables..
* ------------------------------------------------------------------------
* Be sure to Link in EXPAND.LIB next to CLIPPER and EXTEND!
*
?? 'Expand Shell Demonstration: Shelling to DOS from a Clipper application'
?
? 'Current Environment information:'
? '--------------------------------'
? 'Total size allocated to environment : '+Str(EnvSize())
? 'Space used by environment : '+Str(EnvUsed())
? 'Number of Environment strings : '+Str(EnvCount())
for i = 1 to EnvCount()
? Str(i,3)+' '+EnvStr(i)
next
wait
?
? 'Setting new PROMPT (for Shell to DOS):'
if SetEnv('PROMPT','Clipper Shell, type EXIT to return to applic$_'+GetE('PROMPT'))
? 'New Prompt is : '+ReadEnv('PROMPT')
? 'Old Prompt was : '+GetE('PROMPT')
wait
? 'Shelling to DOS....'

* - Have to set Ptr to Env when Shelling, and restore current (of Course)
x = EnvPtr(EnvOrig())
!Command
EnvPtr(x)

* - Restoring Original Prompt. (Use Gete() and .Not. ReadEnv()!!)
SetEnv('PROMPT',GetE('PROMPT'))
else
? 'Not enough room in environment to change PROMPT, not running..'
endif

? 'QUITting the Shell demo..'

QUIT


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : EXPAND30.ZIP
Filename : EXPSHELL.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/