PDA

View Full Version : interpred vs compiled Thin Basic



gordona
22-05-2009, 18:23
Hi;

I'm new to Thin Basic and want to say "thanks" for this great tool. I'm writing code to sit between two boxes that communicate over a serial port. I can't modify the code in either box and my goal is to filter the data stream from box one and forward it to box two. The protocol is 9600,N,8,1.

After many false starts, I found that I was getting a corrupted datastream if I ran the Thin Basic code under the IDE (Thin Air) but it works fine when "compiled". Is this a known problem or am I missing something? It really is not a big issue for me because the final version will not be running under the IDE.

Petr Schreiber
22-05-2009, 19:04
Welcome!,

only known difference between running script from IDE and bundled EXE or script file clicked in shell is that in case of ThinAir launching, there is extra information passed on the command line / as parameter.

See here:


uses "Console", "OS"

dim commandStr as string = os_getCommand
printl "Command line is:"

printl iif$(instr(commandStr, "@"), "You are running this script from ThinAir", "No special characters, you are not running from thinAir")

waitkey


Do you use command line for passing some parameters?
Did you tried to use debugger (F8 key) to find which command makes problems?


Thanks,
Petr

ErosOlmi
25-05-2009, 07:43
Hi Gordona and welcome to thinBasic.

as Petr stated, command line can be one possible problem: running a script from thinAir, it adds an additional command.
Another problem can be the directory where you run your application from. We have found a problem is bundled exe is executed from a USB stick. So if this is the case, please copy your exe in your computer hard disk and retry.

Eros