Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
Wolf via Ql-Users wrote: > does your comment mean the question is solved? Not sure if intentional or not, but OPEN_OVER with NFS device overwrites any file, even if it's marked as read-only. And according to François it returns "not found" if the file really is on a read-only drive like a CD-ROM, haven't tested this myself, though. Cheers, Marcel ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
Hi, does your comment mean the question is solved? Wolfgang On 05/08/2018 10:31, François Van Emelen via Ql-Users wrote: Thank you for your explanation. Have a fine day, François Van Emelen ___ QL-Users Mailing List ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
Op 5/08/2018 om 10:26 schreef Marcel Kilgus via Ql-Users: Wolf via Ql-Users wrote: I didn't get the original question, for a few days I seem to have had some email trouble... This was the complete code: 100 OPEN_OVER#3,'ram2_rdonly_txt' 110 REMark Why does 'dmedium_rdonly(\dev$) return 0 instead of 1 120 REMark Why does 'dmedium_type(\dev$) return -1 instead of 3 130 REMark Why does 'line 240 return -23 WITH qpc2 (which seems correc)t BUT -7 with SMSQMULATOR 140 dev$='dos3_' :d$=DATE$ :datad_temp$=DATAD$ 150 REMark DOS3_ is an external USB CD DRIVE 160 DATA_USE 'dos3_' 170 fichier$=dev$$ 180 WHEN ERRor 190 IF ERNUM:PRINT#3,ERLIN,ERNUM:END IF 200 END WHEN 210 d= FTEST(dev$) 220 IF d<0:CLOSE#3:DELETE 'ram2_rdonly_txt' :DATA_USE datad_temp$:STOP:END IF 230 f=FOP_NEW(fichier$): 240 PRINT#3,240,' f=fop_new(fichier$) = ',f 250 PRINT#3,250,'dmedium_rdonly(\dev$) = '; DMEDIUM_RDONLY(\dev$),'rdonly' 260 PRINT#3,260,'dmedium_type(\dev$) = ', DMEDIUM_TYPE(\dev$),'type' 270 PRINT#3,270,'dmedium_name$(\dev$) = ', DMEDIUM_NAME$(\dev$) ,'name' 280 CLOSE#3 290 DATA_USE datad_temp$ :PAUSE Marcel ___ QL-Users Mailing List Thank you for your explanation. Have a fine day, François Van Emelen ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
I didn't get the original question, for a few days I seem to have had some email trouble... Wolfgang Hi Wolfgang, The original questuion was: Hi All, (if there is still someone listening, of course.) Can someone tell me why the return values in this small prog are different from those found in the SMQS/E SBASIC/SuperBASIC Reference Manual Online Documentation Release 4.0.1 by Rich Mellor and why QPC2 and SMSQMULATOR sometimes return different values as in line 240? Am I using these functions incorrectly? If so, can someone correct me? 100 OPEN_OVER#3,'ram2_rdonly_txt' 110 REMark Why does 'dmedium_rdonly(\dev$) return 0 instead of 1 120 REMark Why does 'dmedium_type(\dev$) return -1 instead of 3 130 REMark Why does 'line 240 return -23 WITH qpc2 (which seems correc)t BUT -7 with SMSQMULATOR 140 dev$='dos3_' :d$=DATE$ :datad_temp$=DATAD$ 150 REMark DOS3_ is an external USB CD DRIVE 160 DATA_USE 'dos3_' 170 fichier$=dev$$ 180 WHEN ERRor 190 IF ERNUM:PRINT#3,ERLIN,ERNUM:END IF 200 END WHEN 210 d= FTEST(dev$) 220 IF d<0:CLOSE#3:DELETE 'ram2_rdonly_txt' :DATA_USE datad_temp$:STOP:END IF 230 f=FOP_NEW(fichier$): 240 PRINT#3,240,' f=fop_new(fichier$) = ',f 250 PRINT#3,250,'dmedium_rdonly(\dev$) = '; DMEDIUM_RDONLY(\dev$),'rdonly' 260 PRINT#3,260,'dmedium_type(\dev$) = ', DMEDIUM_TYPE(\dev$),'type' 270 PRINT#3,270,'dmedium_name$(\dev$) = ', DMEDIUM_NAME$(\dev$) ,'name' 280 CLOSE#3 290 DATA_USE datad_temp$ :PAUSE Thanks for reading this, François Van Emelen ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
Wolf via Ql-Users wrote: > I didn't get the original question, for a few days I seem to have had > some email trouble... This was the complete code: 100 OPEN_OVER#3,'ram2_rdonly_txt' 110 REMark Why does 'dmedium_rdonly(\dev$) return 0 instead of 1 120 REMark Why does 'dmedium_type(\dev$) return -1 instead of 3 130 REMark Why does 'line 240 return -23 WITH qpc2 (which seems correc)t BUT -7 with SMSQMULATOR 140 dev$='dos3_' :d$=DATE$ :datad_temp$=DATAD$ 150 REMark DOS3_ is an external USB CD DRIVE 160 DATA_USE 'dos3_' 170 fichier$=dev$$ 180 WHEN ERRor 190 IF ERNUM:PRINT#3,ERLIN,ERNUM:END IF 200 END WHEN 210 d= FTEST(dev$) 220 IF d<0:CLOSE#3:DELETE 'ram2_rdonly_txt' :DATA_USE datad_temp$:STOP:END IF 230 f=FOP_NEW(fichier$): 240 PRINT#3,240,' f=fop_new(fichier$) = ',f 250 PRINT#3,250,'dmedium_rdonly(\dev$) = '; DMEDIUM_RDONLY(\dev$),'rdonly' 260 PRINT#3,260,'dmedium_type(\dev$) = ', DMEDIUM_TYPE(\dev$),'type' 270 PRINT#3,270,'dmedium_name$(\dev$) = ', DMEDIUM_NAME$(\dev$) ,'name' 280 CLOSE#3 290 DATA_USE datad_temp$ :PAUSE Marcel ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
Hi, I didn't get the original question, for a few days I seem to have had some email trouble... Wolfgang On 04/08/2018 18:01, Norman Dunbar via Ql-Users wrote: On 03/08/18 12:01, François Van Emelen via Ql-Users wrote: Hi all, (if there is still someone listening, of course.) I'm listening, but unfortunately, I don't know the answer. Sorry. :( Cheers, Norm. ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
François Van Emelen via Ql-Users wrote: > 110 REMark Why does 'dmedium_rdonly(\dev$) return 0 instead of 1 > 120 REMark Why does 'dmedium_type(\dev$) return -1 instead of 3 Because I didn't implement special support for this. The DOS device generally doesn't care if the directory you point it to is on a CD or on a network share on the other side of the planet, it's just some directory. Native QDOS driver usually must know the medium type or read-only state anyway, so they can just fill that in. For virtual devices like DOS additional efforts are needed and even then the data is hard to come by. > 130 REMark Why does 'line 240 return -23 WITH qpc2 (which seems > correc)t BUT -7 with SMSQMULATOR Probably Wolfgang just didn't write special code for this error case. This could be considered a minor bug. Cheers, Marcel ___ QL-Users Mailing List
Re: [Ql-Users] return values QPC2 <>SMSQMULATOR
On 03/08/18 12:01, François Van Emelen via Ql-Users wrote: Hi all, (if there is still someone listening, of course.) I'm listening, but unfortunately, I don't know the answer. Sorry. :( Cheers, Norm. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: 27a Lidget Hill Pudsey West Yorkshire United Kingdom LS28 7LG Company Number: 05132767 ___ QL-Users Mailing List