Liberty Basic Programming Language...HELP!
audiobliss
Posts: 12,518
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!
Someone say yes...pleaaaaaaaase!
In UseGeorge Grand wrote: »
PS3, Yamaha CDR-HD1300, Plex, Amazon Fire TV Gen 2
Pioneer Elite VSX-52, Parasound HCA-1000A
Klipsch RF-82ii, RC-62ii, RS-42ii, RW-10d
Epson 8700UB
In Storage
[Home Audio]
Rotel RCD-02, Yamaha KX-W900U, Sony ST-S500ES, Denon DP-7F
Pro-Ject Phono Box MKII, Parasound P/HP-850, ASL Wave 20 monoblocks
Klipsch RF-35, RB-51ii
[Car Audio]
Pioneer Premier DEH-P860MP, Memphis 16-MCA3004, Boston Acoustic RC520
Post edited by RyanC_Masimo on
Comments
-
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 :rolleyes: ):
http://www.tucows.com/preview/400801
....next time, don't be such a procastinator.Sal Palooza -
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!George Grand wrote: »
PS3, Yamaha CDR-HD1300, Plex, Amazon Fire TV Gen 2
Pioneer Elite VSX-52, Parasound HCA-1000A
Klipsch RF-82ii, RC-62ii, RS-42ii, RW-10d
Epson 8700UB
In Storage
[Home Audio]
Rotel RCD-02, Yamaha KX-W900U, Sony ST-S500ES, Denon DP-7F
Pro-Ject Phono Box MKII, Parasound P/HP-850, ASL Wave 20 monoblocks
Klipsch RF-35, RB-51ii
[Car Audio]
Pioneer Premier DEH-P860MP, Memphis 16-MCA3004, Boston Acoustic RC520 -
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.George Grand wrote: »
PS3, Yamaha CDR-HD1300, Plex, Amazon Fire TV Gen 2
Pioneer Elite VSX-52, Parasound HCA-1000A
Klipsch RF-82ii, RC-62ii, RS-42ii, RW-10d
Epson 8700UB
In Storage
[Home Audio]
Rotel RCD-02, Yamaha KX-W900U, Sony ST-S500ES, Denon DP-7F
Pro-Ject Phono Box MKII, Parasound P/HP-850, ASL Wave 20 monoblocks
Klipsch RF-35, RB-51ii
[Car Audio]
Pioneer Premier DEH-P860MP, Memphis 16-MCA3004, Boston Acoustic RC520 -
-
This was my first computer book (a good title and cover): :cool:
http://cgi.ebay.com/My-Computer-Likes-Me-When-I-Speak-in-Basic-by-Albrecht_W0QQitemZ8799902736QQihZ005QQcategoryZ4193QQssPageNameZWDVWQQrdZ1QQcmdZViewItemWin7 Media Center -> Onkyo TXSR702 -> Polk Rti70