Results 1 to 3 of 3

Thread: interpred vs compiled Thin Basic

  1. #1

    interpred vs compiled Thin Basic

    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.

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: interpred vs compiled Thin Basic

    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:
    [code=thinbasic]
    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
    [/code]

    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
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: interpred vs compiled Thin Basic

    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
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Similar Threads

  1. Using Thin Basic in SCADA
    By johni in forum COMM (Serial communication)
    Replies: 2
    Last Post: 22-08-2008, 01:29

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •