Free Shipping on All Orders 1-866-764-1801

Vist our Online Store
+ Reply to Thread
Results 1 to 6 of 6
  1. #1

    Member Sales Rating: (6)

    Join Date
    Dec 2003
    Location
    NC/AR
    Posts
    11,295

    Default Liberty Basic Programming Language...HELP!

    Ok, you're right. I shouldn't have put off doing this lab for my computer class (Introduction to Programming and Logic) 'til the night before...but, I'm me...and so I did. And I'm running across a few problems. Before I go to the length to explain my situation, is anyone familiar with the language Liberty Basic?

    Someone say yes...pleaaaaaaaase!
    Quote Originally Posted by George Grand View Post
    Quote Originally Posted by Jstas View Post
    Simple question. If you had a cool million bucks, what would you do with it?
    Wonder WTF happened to the rest of my money.
    My Saga
    Equipment Pictures

    [2CH]
    Rotel RCD-02
    Yamaha KX-W900U
    Sony ST-S500ES
    Denon DP-7F
    Parasound P/HP-850
    Parasound HCA-1000A
    Klipsch RF-35


    [In Storage]
    Yamaha CDR-HD1300
    ASL Wave 20 monoblocks
    Pro-Ject Phono Box MKII


    [Car System]
    Pioneer Premier DEH-P860MP
    Memphis 16-MCA3004
    Boston Acoustic RC520

  2. #2

    Member Sales Rating: (1)

    Join Date
    Feb 2006
    Location
    Over the mountain watching the watcher
    Posts
    6,263

    Default

    Audiobliss, my opinion is that basic is pretty much basic.
    Sure, Visual Basic, et al, all have their own bells and whistles but if someone is familiar with Visual Basic, they can probably help you fudge it into Liberty Basic.

    A good site with a pretty active Forum section is:

    http://libertybasic.conforums.com/

    Post your problems there, and you should get some quick help.


    TUCOWS has some downloadable software that might help (not sure where you're getting stuck at). It's shareware ($20 to buy ):

    http://www.tucows.com/preview/400801


    ....next time, don't be such a procastinator. :)
    MrBigBlueLight
    Usually right, but sometimes not entirely factually correct.
    Shifting to Plan B

  3. #3

    Member Sales Rating: (6)

    Join Date
    Dec 2003
    Location
    NC/AR
    Posts
    11,295

    Default

    Thank you very much! I appreciate your input!

    I was getting stuck with a DO WHILE loop, but I think my problem was actually not using quotes around a string variable. I have that figured out, but now I'm trying to figure out how to format my output to make it more presentable.

    Anyhoo, thanks for the links very much, and I'll be sure to get a jump start on the next lab assignment! :)
    Quote Originally Posted by George Grand View Post
    Quote Originally Posted by Jstas View Post
    Simple question. If you had a cool million bucks, what would you do with it?
    Wonder WTF happened to the rest of my money.
    My Saga
    Equipment Pictures

    [2CH]
    Rotel RCD-02
    Yamaha KX-W900U
    Sony ST-S500ES
    Denon DP-7F
    Parasound P/HP-850
    Parasound HCA-1000A
    Klipsch RF-35


    [In Storage]
    Yamaha CDR-HD1300
    ASL Wave 20 monoblocks
    Pro-Ject Phono Box MKII


    [Car System]
    Pioneer Premier DEH-P860MP
    Memphis 16-MCA3004
    Boston Acoustic RC520

  4. #4

    Member Sales Rating: (6)

    Join Date
    Dec 2003
    Location
    NC/AR
    Posts
    11,295

    Default

    Well, I finally figured it out. I've been writing this program now for probably the better part of three hours; but now it works! AND, I've had no help. Sure, I posted on the forum mrbigbluelight linked to, but they took just a few minutes too long to respond...either that or I was too fast ;)

    So, anyhoo, now that I figured it out...and stayed up 'til 3am doing so...you better believe I'm going to post it here and brag about it!!!

    First off, the program's purpose. The user is prompted to enter a license plate number, customer name, cost of repair, and a repair code. Then the computer figures the total price based on the cost of repair and differents for the different repair codes. Then it displays the results. It's setup to continue this in a loop unti the 'dummy record' with license plate 'zzz000' or 'zzz 000' is entered, at which point the program is finished.

    So, here's the code:
    [start]
    GOSUB [houseKeeping]
    GOSUB [mainLoop]
    GOSUB [finishUp]
    END

    [houseKeeping]
    'declare variables
    'open files
    'print headings
    GOSUB [getInput]
    RETURN

    [getInput]
    INPUT "Enter the customer's license plate number:==> " ; licPlate$
    INPUT "Enter the customer's name:==================> " ; custName$
    INPUT "Enter the cost of repair:===================>$" ; repCost
    INPUT "Enter the repair code:======================> " ; repCode
    RETURN

    [mainLoop]
    DO WHILE licPlate$ <> "zzz000" and licPlate$ <> "zzz 000"
    GOSUB [processInput]
    GOSUB [printOutput]
    LOOP
    RETURN

    [processInput]
    SELECT CASE repCode
    CASE 1
    repCodeDef$ = "MAINTENENCE"
    payAmt = repCost
    CASE 2
    repCodeDef$ = "MINOR REPAIR"
    labor = 25
    payAmt = repCost + labor
    CASE 3
    repCodeDef$ = "MAJOR REPAIR"
    labor = .30 * repCost
    payAmt = repCost + labor
    CASE 4
    repCodeDef$ = "DETAIL WORK"
    labor = .40 * repCost
    payAmt = repCost + labor
    CASE ELSE
    repCodeDef$ = "INVALID DATA"
    END SELECT
    RETURN

    [printOutput]
    CLS
    IF repCodeDef$ = "INVALID DATA" THEN
    PRINT "Customer's license plate number:=> " ; licPlate$
    PRINT "Customer Name:===================> " ; custName$
    PRINT "Cost of repair:==================>$" ; USING("####.##",repCost)
    PRINT
    PRINT " INVALID CODE"
    ELSE
    PRINT "Customer's license plate number:=> " ; licPlate$
    PRINT "Customer Name:===================> " ; custName$
    PRINT "Cost of repair:==================>$" ; USING("####.##",repCost)
    PRINT "Labor:===========================>$" ; USING("####.##",labor)
    PRINT "Amount of Payment:===============>$" ; USING("####.##",payAmt)
    PRINT "Type of repair completed:========> " ; repCodeDef$
    END IF
    GOSUB [pause]
    RETURN

    [pause]
    PRINT
    PRINT
    INPUT " Press Enter to enter next record" ; temp$
    CLS
    GOSUB [getInput]
    RETURN

    [finishUp]
    'close files
    PRINT
    PRINT " END OF FILE REACHED"
    RETURN
    Oh, and if you're interested in Liberty Basic, it's a free programming language. You can quickly download the small redering program at www.libertybasic.com and plug in my program and it'll work; or you can come up with your own.
    Quote Originally Posted by George Grand View Post
    Quote Originally Posted by Jstas View Post
    Simple question. If you had a cool million bucks, what would you do with it?
    Wonder WTF happened to the rest of my money.
    My Saga
    Equipment Pictures

    [2CH]
    Rotel RCD-02
    Yamaha KX-W900U
    Sony ST-S500ES
    Denon DP-7F
    Parasound P/HP-850
    Parasound HCA-1000A
    Klipsch RF-35


    [In Storage]
    Yamaha CDR-HD1300
    ASL Wave 20 monoblocks
    Pro-Ject Phono Box MKII


    [Car System]
    Pioneer Premier DEH-P860MP
    Memphis 16-MCA3004
    Boston Acoustic RC520

  5. #5

    Member Sales Rating: (49)

    Join Date
    May 2005
    Location
    North of Boston
    Posts
    6,441

    Default


  6. #6

    Member Sales Rating: (0)

    Join Date
    May 2004
    Location
    Poughkeepsie, NY
    Posts
    623

    Default

    This was my first computer book (a good title and cover):

    http://cgi.ebay.com/My-Computer-Like...QQcmdZViewItem
    Attached Images  
    Last edited by TheReaper; 10-16-2006 at 05:47 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. basic basic hook up help
    By twilson066 in forum Basic Hookup/Wiring Questions
    Replies: 2
    Last Post: 07-25-2005, 01:06 PM
  2. Basic Placement Recomendation
    By Dale I in forum Basic Hookup/Wiring Questions
    Replies: 12
    Last Post: 11-24-2004, 12:26 AM
  3. Programming Language Inventor or Serial Killer?
    By Spoonman in forum The Clubhouse
    Replies: 1
    Last Post: 03-05-2004, 11:47 AM

Posting Permissions

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