Results 1 to 4 of 4

Thread: base conversion

  1. #1
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Blog Entries
    1
    Rep Power
    153

    base conversion

    I posted this on the coding monkeys site but thought I would put it up here for the people that dont use coding monkeys.

    simple console script that show 3 different techniques for base10 to binary (string) conversion.

    One thing I dont know,how to close the console window when I've finished.

    Attached Files Attached Files
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  2. #2
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Leverkusen, Germany
    Age
    51
    Posts
    3,281
    Blog Entries
    2
    Rep Power
    340

    Re: base conversion

    When you run the script from the explorer it closed right away, so you should add at least a waitkeypress or something like that. When you run it from the IDE, then the console window stays open.
    Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200.

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,198
    Blog Entries
    2
    Rep Power
    10

    Re: base conversion

    Yes, exactly.

    When console scripts are invoked by the shell, usually the console window is closed automatically by the operating system. To stop execution and have time to see results a CONSOLE_WAITKEY is needed at the end.

    When console script are executing from inside thinAir, thinAir uses two different methods to run the script depending on how is setup the flag "Close Console Box" present in thinAir Options (General tab).

    Anyhow, thanks for the script!.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  4. #4
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    61
    Posts
    3,869
    Rep Power
    398

    Re: base conversion

    I am glad you posted it at coding monkeys too Abraxas. We used to post a lot over there and I think it helps to get attenion to thinBasic.

    I wonder if there is a way to mirror certain threads on this forum so it would appear at coding monkeys, like the code snippets and demos posts?

    Maybe Eros and Cameron can figure out a way since they both use SMF for the forum package.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Similar Threads

  1. Discussion: Time base for TBEM
    By ErosOlmi in forum TBEM module - thinBasic Event Manager module
    Replies: 12
    Last Post: 10-10-2008, 20:22

Posting Permissions

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