George Gwilt schreef op 29/11/2014 om 16:31:
On 29 Nov 2014, at 14:04, François Van Emelen <[email protected]>
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
PRINT PARTYP(pay$) will give the answer 1
260 PRINT PARUSE(1) :REMark prints 2 :shouldn't that be 1 ->variable
PARUSE like PARTYP is a function taking the name of the parameter of the
procedure or function as its own parameter. I have not been able so far in
testing this to find a value other than 2. How odd (or even rather).
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
George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm
Hi,
Thank you for your answer.
It seems PARTYP and PARUSE still hide some of their of their mysteries
to me.
Back to the manual and my English dictionary .
Have a fine evening.
François Van Emelen
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm