Re: [Ql-Users] Read_string$ (menu extension)
Op 11/12/2017 om 17:54 schreef desin via Ql-Users: Am 11.12.2017 um 14:22 schrieb François Van Emelen via Ql-Users: Hi all, Is there a length limit to the editable string (suggestion$) in the function READ_STRING$? answer$=read_string$(" edit ",suggestion$,request$,length,xpos,ypos) If there is any info about it, where can I find it? Thank you in advance. François Van Emelen ___ QL-Users Mailing List if you need more use this careful with menu_rext pre 8.04 the string length (name$(nr)="1234567890") must not exceed the the given length (dim name$(nr,length) otherwise your system will crash 100 CLEAR 110 nr = 0 : DIM name$(nr,60), name%(nr) 120 : 125 name$(nr) ="12345678901234567890123456789012345678901234567890" 130 name%(nr) = 16384 140 : 170 : 180 REPeat loop 190 REMark this works with menu_rext 7.66 200 : 210 REMark r = LIST_SELECT ("Test",name$,name%,) 220 : 230 REMark workaround for 8.0x but not 7.66 235 : 240 REMark r = LIST_SELECT (" Test ",name$,name%,) 245 : 250 SELect ON r 270 = -2 290 s = name%(0)&&(BIN$ (16,16)) 300 IF s = 256 310 PRINT #1, name$(0) 320 END IF 350 = -1 :EXIT loop 370 = REMAINDER 380 END SELect 390 END REPeat loop Greetings from Switzerland Markus ___ QL-Users Mailing List Thanks for your reply. I'm using v8.4 The listing above listing proves that we can't trust 'read_string$'. I have noticed that there are in fact 2 limits: 1 ) answer$=read_string$(" edit ",suggestion$,request$,length,xpos,ypos) : suggestion$ seems to be safe up to 100 characters. (system locks at 150). So, the limit is somewhere between 100 and 150. 2) read_string$(.) returns out of range if the window is too small to display the string. Conclusion , at least for me, avoid read_string$. Thanks for your help. Have a fine day. François Van Emelen ___ QL-Users Mailing List
Re: [Ql-Users] Read_string$ (menu extension)
Am 11.12.2017 um 14:22 schrieb François Van Emelen via Ql-Users: Hi all, Is there a length limit to the editable string (suggestion$) in the function READ_STRING$? answer$=read_string$(" edit ",suggestion$,request$,length,xpos,ypos) If there is any info about it, where can I find it? Thank you in advance. François Van Emelen ___ QL-Users Mailing List if you need more use this careful with menu_rext pre 8.04 the string length (name$(nr)="1234567890") must not exceed the the given length (dim name$(nr,length) otherwise your system will crash 100 CLEAR 110 nr = 0 : DIM name$(nr,60), name%(nr) 120 : 125 name$(nr) ="12345678901234567890123456789012345678901234567890" 130 name%(nr) = 16384 140 : 170 : 180 REPeat loop 190 REMark this works with menu_rext 7.66 200 : 210 REMark r = LIST_SELECT ("Test",name$,name%,) 220 : 230 REMark workaround for 8.0x but not 7.66 235 : 240 REMark r = LIST_SELECT (" Test ",name$,name%,) 245 : 250 SELect ON r 270= -2 290 s = name%(0)&&(BIN$ (16,16)) 300IF s = 256 310 PRINT #1, name$(0) 320END IF 350= -1 :EXIT loop 370= REMAINDER 380 END SELect 390 END REPeat loop Greetings from Switzerland Markus ___ QL-Users Mailing List
Re: [Ql-Users] Read_string$ (menu extension)
Am 11.12.2017 um 14:22 schrieb François Van Emelen via Ql-Users: Hi all, Is there a length limit to the editable string (suggestion$) in the function READ_STRING$? answer$=read_string$(" edit ",suggestion$,request$,length,xpos,ypos) If there is any info about it, where can I find it? Thank you in advance. François Van Emelen ___ QL-Users Mailing List just a quick test 10 a$="1234567890123567890123456789012345678901234567890" 20 PRINT READ_STRING$ ("test",a$) only 35 characters Greetings from Switzerland Markus ___ QL-Users Mailing List