Hi all,

There is some more explanation and worked examples of PARNAM$, PARTYP and PARUSE in the SBASIC/SuperBASIC Reference Manual - see

http://www.rwapsoftware.co.uk/SBASIC_reference_manual_online/KeywordsP.html#PARTYP

Rich


On 29/11/2014 14:04, François Van Emelen wrote:
Hi all,

(Is there still someone listening here?)

Three questions

1. Can someone tell me why the values printed for PARTYP and PARUSE in lines 240 to 350 are always 2?
 Is there something wrong with these functions or am I missing something?

100 :REMark  test return values of par_use,par_typ,parnam$
110 REMark string
120   pay$="Belgium"
130 REMark array
140 DIM langue$(2,10):langue$(0)="Dutch":langue$(1)="French":langue$(2)="German":
150 REMark float
160  keyboardcode=32
170 REMark integer
180  a%=1
190 PRINT TEST_PARAM(pay$,langue$,keyboardcode,a%):PAUSE
200 :
210 DEFine FuNction TEST_PARAM (p$,l$,k,i%)
220 :
230 :
240 PRINT PARNAM$(1)  :REMark prints 'pay$' as expected
250 PRINT PARTYP(1)   :REMark prints 2  :shouldn't that be 1 ->string
260 PRINT PARUSE(1)   :REMark prints 2  :shouldn't that be 1 ->variable
270 PRINT PARNAM$(2)  :REMark prints 'langue$' as expected
280 PRINT PARTYP(2)   :REMark prints 2 :shouldn't that be 1 ->string
290 PRINT PARUSE(2) :REMark prints 2 :shouldn't that be 2 ->langue$ is an array
300 PRINT PARNAM$(3)  :REMark prints 'keyboardcode' as lexpected
310 PRINT PARTYP(3) :REMark prints 2: correct -> keyboardcode is a float
320 PRINT PARUSE(3)   :REMark prints 2::shouldn'tthat  be be 1 ->string
330 PRINT PARNAM$(4)  :REMark prints 'a%' as expected
340 PRINT PARTYP(4) : REMark prints 2 :shouldn't that be be 3 -> a% is an integer
350 PRINT PARUSE(4)  : REMark prints 2 :shouldn't be be 1 ->variable
360 REMark the values for partyp and paruse are always 2:why?
370  RETurn "What's wrong?":
380  REMark the returned value is not important here
390 :
400 END DEFine TEST_PARAM
2. Is there a way to find out how many languages are supported (English,French,..)? 3. Once we know which language is active (with language($), can we access the strings containing the days of the week
and the string with the names of the months?

Some help would be appreciated.
François Van Emelen



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



--
Rich Mellor
RWAP Services
Specialist Enuuk Auction Programming Services

www.rwapservices.co.uk

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

Reply via email to