Malcolm Cadman writes:
<>
>>> Can anyone help me with using a portable Zip Drive as a source, running
>>> QPC, and being attached to 2 different PC's ( not at the same time ) ?

<>

>> Once QPC2 is running you can use the SBasic function QPC_NETNAME$ to
>> find out which machine youre running under (provided youve set this
>> under Windows first). I have different directories for the different
>> platforms SMSQ/E runs under, containing the different
>> platform-specific configuration files such as printer drivers,
>> FileInfo2_cfg, MenuConf_inf, etc. On my QPC2 systems I use the net
>> name to tell them apart.
> 
> Umm ... can you explain more about how to set up a net name ?  I've not 
> used that feature. That is interesting.

Right click on the My Computer icon on the desktop, or open the System 
module in the Control Panel. Select the Computer Name tab and click on 
Change... then give your computer a nice name ;o) That name, which 
should be unique on your LAN, is returned by the function QPC_NETNAME$.

> Going back to what I said earlier ... having more that one boot file, 
> one loading another, using LRUN, seems to clear the BASIC memory area of 
> a "windrive$" variable that I have just obtained from user input.
> 
> I was hoping for a way of preserving that value, so that the next boot 
> file could then use the variable.

There are different ways of passing information to SBasic jobs:

o You can MRUN (or MERGE) stuff, of course. That retains the values of 
any variables set prior to MRUN.

o You can also use the EW/EX <progname>_bas; 'data' to pass 
information to a program or module, which in turn can read that 
information from the pseudo variable CMD$. Try this (call it 
ram1_test_bas):

100 open#1; 'con': cls#1: print#1; CMD$: pause#1: quit

thus:

EX ram1_test; 'data'

It should print 'data' to the screen. (Note you dont have to specify 
the _bas unless you also have a ram1_test_exe!)

o You can also use QUIT <number> to return a value from a sub program:

100 open#1; 'con': cls#1
110 IF CMD$ == 'data' then
120  print#1; 'ok!': pause#1; 100: quit 1000
130 ELSE
140  quit -15
150 END IF

Test with:

print FEW('ram1_test_bas'; 'data')

and

print FEW('ram1_test_bas'; 'x')

o You could also use the environmental varables, as implemented in 
Richard Zidlicski's(?) ENV_BIN

There are other ways too, but this should be a good start.

Bestaluck!

Per
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to