Results 1 to 5 of 5

Thread: difference between .tbasic and .tbasicc

  1. #1

    difference between .tbasic and .tbasicc

    Sorry, but I'm having trouble understanding something about console programs.

    What is the differences between using .tbasic and .tbasicc extensions when writing console programs?

    Thanks
    Sandy

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

    Re: difference between .tbasic and .tbasicc

    Sandy,

    .tBasic script are executed by thinBasic.exe that is a native Win32 GUI application
    .tBasicc script are executed by thinBasicc.exe that is a native Win32 Console application (when executed, an automatic console window is opened even if you do not need it)

    In both cases, to use console commands, you need to add USES "Console" statement inside scripts.

    The real big difference between the 2 executable is that thinBasicc.exe can handle standard input/output.
    It was mainly created in order to be able to use thinBasic script as server side script in web servers. More or less like PHP scripts.


    My suggestion is to always use .tBasic scripts and not .tbasicc unless you really need it.
    To use console commands just add USES "Console" in your script.

    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

  3. #3

    Re: difference between .tbasic and .tbasicc

    The real big difference between the 2 executable is that thinBasicc.exe can handle standard input/output.
    What is standard input/output?

    Thanks
    Sandy

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

    Re: difference between .tbasic and .tbasicc

    [wiki=Standard_streams]Standard_streams[/wiki]

    Well, not easy to reply in details.
    Mainly it is the possibility to send the output of a program as the input of another.
    A classical and easy example is using the DIR command and send its output (the list of the files) os input of the MORE command in order to be shown by pages. To achieve this it is normally used the | symbol (called pipe)

    Example.
    Open a console command prompt and type DIR in a directory that have more that 30/50 files:
    [code=dos]DIR *.*[/code]
    Now do the same piping DIR output as input of MORE command:
    [code=dos]DIR *.* | MORE[/code]
    This command redirect the output of DIR to be the input of MORE.

    Back to thinBasic, the Console version of thinBasic is able to handle this.

    Ciao
    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

  5. #5

    Re: difference between .tbasic and .tbasicc

    Thank you for the reply. It helps.

    Currently I'm working on a script for a friend and it uses console_write and console_writeline for output. It expects all input to come from the keyboard. As near as I can tell, using the .tbasicc would be fine for it. It's a simple version of the Lemonade Stand game.

    Thanks
    Sandy

Similar Threads

  1. Invoking One .tbasic Program From Another .tbasic Program
    By gungadout in forum thinBasic General
    Replies: 46
    Last Post: 23-11-2009, 12:01

Members who have read this thread: 2

Posting Permissions

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