VATCALC
Moderator: Moderator Team
VATCALC
Hi,
I am learning BASIC and i have made a program that is designed to work out VAT on a item.
I have a wiki page for it, http://matthewhughes.wikispaces.com/vatcalcbasic and i would like to see it bundled with REACTOS because the one place it lacks is in its bundled software. And it would be good for people in Europe who use VAT.
Here is the code. As far as i am aware, it is bug free. Although i will let you decide.
[start]
print "Type a pound and pence amount."
input "(Press 'Enter' alone for help) ?"; amount
if amount = 0 then goto [help]
let tax = amount * 0.17
print "Tax is: "; tax; ". Total is: "; tax + amount
goto [start]
[help]
print "This tax program determines how much vat is"
print "due on an amount entered and also computes"
print "the total amount. The tax rate is 17%"
goto [start]
Have fun.
I am learning BASIC and i have made a program that is designed to work out VAT on a item.
I have a wiki page for it, http://matthewhughes.wikispaces.com/vatcalcbasic and i would like to see it bundled with REACTOS because the one place it lacks is in its bundled software. And it would be good for people in Europe who use VAT.
Here is the code. As far as i am aware, it is bug free. Although i will let you decide.
[start]
print "Type a pound and pence amount."
input "(Press 'Enter' alone for help) ?"; amount
if amount = 0 then goto [help]
let tax = amount * 0.17
print "Tax is: "; tax; ". Total is: "; tax + amount
goto [start]
[help]
print "This tax program determines how much vat is"
print "due on an amount entered and also computes"
print "the total amount. The tax rate is 17%"
goto [start]
Have fun.
-
- Developer
- Posts: 48
- Joined: Sun Sep 18, 2005 11:58 pm
- Location: Germany
- Contact:
-
- Developer
- Posts: 48
- Joined: Sun Sep 18, 2005 11:58 pm
- Location: Germany
- Contact:
-
- Developer
- Posts: 48
- Joined: Sun Sep 18, 2005 11:58 pm
- Location: Germany
- Contact:
I don't know the basic dialect you used for your small app - but:
-you should try to avoid the goto here - you should use while or do until loop instead
-you should give the user the ability to leave the program
-the VAT shouldn't be hardcoded (it is 19% in germany, 25% in sweden, ...)
-let isn't used in modern basic dialects anymore
-noone will use a console app for VAT calculation in Windows anymore
-you should try to avoid the goto here - you should use while or do until loop instead
-you should give the user the ability to leave the program
-the VAT shouldn't be hardcoded (it is 19% in germany, 25% in sweden, ...)
-let isn't used in modern basic dialects anymore
-noone will use a console app for VAT calculation in Windows anymore
No, it isn't but check this tool out.themoomin wrote:Some people think that Basic is a dead language. I think some people are morons.
»Forward Agency NPO
In progress we (always) trust.
In progress we (always) trust.
Matthew Hughes
The dialect i use is Just Basic. It is a good stepping stone. I intend to learn python next.
I intend to customise VAT for each country. For example, germany, sweden. Thanks for pointing this out. I thought the EU controled VAT taxation for countries in the EU. Thats why when the UK joined the EU VAT increased from 15% to 17.5%.
I know the let command is not used that much any more. However, i wanted it to be easily customisable for use on retro microcomputers.
I will post the finished result to my blog.
I intend to add an exit button. Remember, it is still in alpha.
One little program i have messed around with is
[start]
Print "you smell!"
GOTO [start]
It is a good prank program, you agree?
Matthew
I intend to customise VAT for each country. For example, germany, sweden. Thanks for pointing this out. I thought the EU controled VAT taxation for countries in the EU. Thats why when the UK joined the EU VAT increased from 15% to 17.5%.
I know the let command is not used that much any more. However, i wanted it to be easily customisable for use on retro microcomputers.
I will post the finished result to my blog.
I intend to add an exit button. Remember, it is still in alpha.
One little program i have messed around with is
[start]
Print "you smell!"
GOTO [start]
It is a good prank program, you agree?
Matthew
-
- Posts: 52
- Joined: Tue Jul 04, 2006 1:39 pm
Re: Matthew Hughes
If you want to help, learn C. Not some scripting language.themoomin wrote:I intend to learn python next.
Re: VATCALC
http://www.reactos.org/forum/viewtopic.php?t=3913themoomin wrote:Hi,
I am learning BASIC and i have made a program that is designed to work out VAT on a item. i would like to see it bundled with REACTOS because the one place it lacks is in its bundled software.
It compiles, let's ship it!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 14 guests