VATCALC

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
themoomin
Posts: 3
Joined: Thu May 10, 2007 11:31 pm

VATCALC

Post by themoomin »

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.
Christoph_vW
Developer
Posts: 48
Joined: Sun Sep 18, 2005 11:58 pm
Location: Germany
Contact:

Post by Christoph_vW »

1.
We won't bundle any software which isn't party of Windows too.

2.
Only apps written in C will be included in the ReactOS repository for portability reasons.
themoomin
Posts: 3
Joined: Thu May 10, 2007 11:31 pm

Post by themoomin »

Very well.

Some people think that Basic is a dead language. I think some people are morons.

:)

I intend to put it into a .exe file soon. Will somebody test it on reactos for me?
Christoph_vW
Developer
Posts: 48
Joined: Sun Sep 18, 2005 11:58 pm
Location: Germany
Contact:

Post by Christoph_vW »

I never said that Basic is a dead language - but it isn't very portable.

ReactOS will be ported to different archtitectures. And there is no basic compiler for Windows PPC executables. We will even have to modify gcc/binutils to support them.
Christoph_vW
Developer
Posts: 48
Joined: Sun Sep 18, 2005 11:58 pm
Location: Germany
Contact:

Post by Christoph_vW »

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
oiaohm
Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

Post by oiaohm »

Ok this seams strange to me to have a stand alone tax calc.

Why not just add a tax button to the ros calulator. Yes there are such things as calutators for finance with a programmable tax button
forart
Posts: 1050
Joined: Mon Nov 29, 2004 1:36 pm
Location: Italy
Contact:

Post by forart »

themoomin wrote:Some people think that Basic is a dead language. I think some people are morons.
No, it isn't but check this tool out.

:wink:
»Forward Agency NPO
In progress we (always) trust.
themoomin
Posts: 3
Joined: Thu May 10, 2007 11:31 pm

Matthew Hughes

Post by themoomin »

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
InFeRnODeMoN
Posts: 52
Joined: Tue Jul 04, 2006 1:39 pm

Re: Matthew Hughes

Post by InFeRnODeMoN »

themoomin wrote:I intend to learn python next.
If you want to help, learn C. Not some scripting language.
mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Re: VATCALC

Post by mf »

themoomin 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.
http://www.reactos.org/forum/viewtopic.php?t=3913
It compiles, let's ship it!
Reacter
Posts: 326
Joined: Tue Feb 06, 2007 9:57 pm
Location: Tornado Alley

Post by Reacter »

If you want to learn a script language for ReactOS, pick (drumroll please,) BATCH!. :) ReactOS has enough batch support that I can build a calculator in batch, build ReactOS build environments, and I have a rather basic DOSTAX.bat script.
More ReactOS, please!
Post Reply

Who is online

Users browsing this forum: DotBot [Crawler] and 6 guests