In message <[EMAIL PROTECTED]>, P Witte 
<[EMAIL PROTECTED]> writes

>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$.

Ah yes, renaming the "My Computer" name ...

>> 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.

Ah ... that is the one !  I had forgotten about MERGE and RUN.

Implementing that has solved my problem !  Thanks Per !!

All I then had to do was to renumber my boot files, so that the line 
numbers are as successive groups, for each of the individual boot files.

In my case ... first boot file is numbered from Line 10 onwards ... then 
second boot file is numbered from Line 500 onwards ... then the third 
boot file(s) are all numbered from LINE 1000 onwards ( the third boot 
file are different configurations at runtime ).

It now works fine ... :-)

I did look up the HISTORY command - pages 61 and 62 in the QPC_Concepts 
PDF.

That used as a virtual device did what I was trying to achieve, however, 
the LRUN was losing the value :

500 OPEN_NEW#4,HISTORY_device : REMark Open a new HISTORY as Public
510 PUT#4,windrive$ : REMark Put the value of windrive$ in to the 
HISTORY
..... later
600 GET#4,drive$ : REMark Get the value out of the HISTORY when needed

I had not used this before ... an interesting Command.  Similar to 
PIPES, but a bit easier to use.

The values with HISTORY are read out as LIFO - Last In First Out.

I didn't need to use these further more complex ideas.  Although, thanks 
for the brainstorm ... :-)

>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

Yes, there should be a way of doing what I wanted with an environment 
variable ... yet my efforts failed ... :-(

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

Yes, I have had the luck ... :-) ... thanks again.

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

Reply via email to