Hrm...with QB, I always used VARSEG with the element I believe. My TinyPTC extension library is directly ported from C, so there's probably a few more places where it's gonna be a lil weird in the conversion.
In a big program (which compiles fine) I changed this line:
Code:
IF o$ = "open closet @ keys" OR o$ = "use keys @ closet" OR o$ = "open @ keys closet" THEN
For this other:
Code:
IF (instr(o$,"open") or instr(o$,"use")) and instr(o$,"closet") and instr(o$,"key") then
Now, when compiling, it gives a "missing END SUB" in the first "SUB" line after the current sub's "END SUB". There's something wrong with expressions.
If I undo the changes, it compiles just fine.
I couldn't reproduce that, tried with:
Code:
sub foo
IF (instr(o$,"open") or instr(o$,"use")) and instr(o$,"closet") and instr(o$,"key") then
end if
IF (instr(o$,"open") or instr(o$,"use")) and instr(o$,"closet") and instr(o$,"key") then
end if
IF (instr(o$,"open") or instr(o$,"use")) and instr(o$,"closet") and instr(o$,"key") then
end if
end sub
sub bar
end sub
Could you send the full sources that are causing that error and the line input one? By email it would be okay.. spanish is no problem to me either ;) Thx.
New bug?:
My code:
[syntax="qbasic"]DIM cmdline AS STRING
DIM yn AS STRING
1 INPUT ">", cmdline
SHELL cmdline
INPUT "again? (y|n) >", yn
IF LCASE$(yn) = "yes" OR LCASE$(yn) = "y" THEN GOTO 1
END[/syntax]
Quote:C:\Documents and Settings\leo\SKRIVB~1\freeBASIC>fbc cmdline.bas
Assembler messages:
Can't open and for reading: No such file or directory
and:0: Can't open Settings\leo\SKRIVB~1\freeBASIC\bin\as.exe for reading: No suc
h file or directory
C:\Documents: cannot open linker script file C:\Documents: No such file or direc
tory
C:\Documents and Settings\leo\SKRIVB~1\freeBASIC>
"C:\Documents: cannot open linker script file C:\Documents"
Fixed path?
EDIT:: FreeBASIC v0.05b
FB doesent like spaces in the path it seems
w00t Z!re!
I moved the thing to be directly under c:\freebasic
and then it worked... I thought I tested for that hmm...
Whatever. It worked from the above folders in some
previous verision anyway. v3cz0r?
it's more windows the FB.
Paths with spaces and unicode unicode chars need to be passed inside qoutes which i guess fb doesn't
Quote:Could you send the full sources that are causing that error and the line input one? By email it would be okay.. spanish is no problem to me either Thx.
I will do later... I've been trying to reproduce the error and I couldn't
Anyhow, the sources are really ugly. Maybe it was just a side effect. I'll send them anyways.
Alright..
About the paths with spaces on them, that's not FB, LD and AS can't run fine when the path used to execute them has white spaces on it.. *nix stuff.
Anyway, i found a work-around for that, RUN, CHAIN and EXEC now check if paths have spaces on them and then make a short path (old 8.3 format), if needed.. worked fine.
If you pass an integer to a sub which calls for UBYTES, the effect is the same as byref.
This was a bastard to hunt down.