Posts: 3,279
Threads: 170
Joined: Nov 2003
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.
I'd knock on wood, but my desk is particle board.
Posts: 6,419
Threads: 74
Joined: Mar 2002
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.
Posts: 922
Threads: 15
Joined: Jun 2003
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.
Posts: 1,080
Threads: 87
Joined: Feb 2002
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
/post]
Posts: 3,522
Threads: 189
Joined: Dec 2003
FB doesent like spaces in the path it seems
Posts: 1,080
Threads: 87
Joined: Feb 2002
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?
/post]
Posts: 788
Threads: 53
Joined: Nov 2002
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
oship me and i will give you lots of guurrls and beeea
Posts: 6,419
Threads: 74
Joined: Mar 2002
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.
Posts: 922
Threads: 15
Joined: Jun 2003
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.
Posts: 729
Threads: 104
Joined: Jan 2003
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.