Convert Programming Language

This is a discussion on Convert Programming Language within the C++ Programming forums, part of the General Programming Boards category; I am trying to write a program in TI BASIC (TI 83 plus calculator programming) by converting a C++ program ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    2

    Convert Programming Language

    I am trying to write a program in TI BASIC (TI 83 plus calculator programming) by converting a C++ program I made, but I can't make an If-Else If statement. Does anyone know how I can write If-Else If in TI BASIC? If not, is there a site that can convert C++ to TI BASIC?

    PS I am programming in TI BASIC because I can carry my calculator with me, but not my desktop.

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    BASIC uses IF THEN ELSE


    Code:
    IF x = 5 THEN y = 1 ELSE IF x = 6 THEN y = 2
    You should see if it supports the PEEK and POKE commands, then write a C/C++ compiler in BASIC
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,238
    Quote Originally Posted by Korkymann View Post
    I am trying to write a program in TI BASIC (TI 83 plus calculator programming) by converting a C++ program I made, but I can't make an If-Else If statement. Does anyone know how I can write If-Else If in TI BASIC? If not, is there a site that can convert C++ to TI BASIC?

    PS I am programming in TI BASIC because I can carry my calculator with me, but not my desktop.
    I'm not sure if TI BASIC has an "else" syntax. That wasn't in the original BASIC anyway. The way you did "else" in traditional BASIC was:

    Code:
    if condition then goto label1
        true_block
        goto label2
    label1:
        false_block
    label2:
    It's been a while since I programmed a TI, but I think that's how you have to do it.

    EDIT: Or, for multiple chained if-else, you would do:

    Code:
    if condition1 then goto label1
    if condition2 then goto label2
    if condition3 then goto label3
    goto label4
    label1:
        block_1
        goto label4
    label2:
        block_2
        goto label4
    label3:
        block_3
        goto label4
    label4:
    Structured programming -- now do you get why it's valuable?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    63
    A C++ compiler in BASIC? I think that's sacrilege, or something worse.

    In any case, I think this TI Basic tutorial site might be right up your alley.

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    2
    Thanks for your help, I have found a more relevant forum for my post (a TI BASIC programming forum to be precise).

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by Korkymann View Post
    Thanks for your help, I have found a more relevant forum for my post (a TI BASIC programming forum to be precise).
    Gasp!!!!, you mean there are other programming sites besides this one
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 08-21-2006, 06:42 AM
  2. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  3. Which Language? need help ASAP
    By jcw122 in forum Tech Board
    Replies: 7
    Last Post: 03-07-2005, 03:16 PM
  4. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 01:40 PM
  5. Convert Char to Int Function
    By drdroid in forum C++ Programming
    Replies: 9
    Last Post: 02-19-2003, 11:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21