Author Topic: Delphi V7 calculator HELP !  (Read 1337 times)

0 Members and 1 Guest are viewing this topic.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 558
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Delphi V7 calculator HELP !
« on: August 09, 2010, 09:02:15 pm »
Number = 0 to 9
Action = /,+,*,-

So i did the button of the calculator but now i don't know how to put that if a player click on Number,Action,Number that equal something ...

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Delphi V7 calculator HELP !
« Reply #1 on: August 10, 2010, 02:38:08 am »
Store the first button in a variable, store the action in a variable, store the second number in a variable, when they press the equals button, use conditional statements to do whatever the action was to the two numbers.

I reccomend you read/watch a tutorial on it.

Found something for Delphi 2, so it should work for delphi 7.

First Part
Second

The sites may make your eyes bleed, and I haven't actually read through the whole thing, but it seems ok.
« Last Edit: August 10, 2010, 02:54:50 am by chutem »
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: Delphi V7 calculator HELP !
« Reply #2 on: August 10, 2010, 06:40:12 am »
This is not a Soldat related application, and thus has no business being in the Soldat Developers Corner.

I'm moving it to the lounge.
There are other worlds than these

Offline -Major-

  • Veteran
  • *****
  • Posts: 1419
Re: Delphi V7 calculator HELP !
« Reply #3 on: August 10, 2010, 11:10:00 am »
you should probably use some other programming language tho.
visual basic is very beginner friendly, and then when you're somewhat comfy with it, you can go to C# and then c++.

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Delphi V7 calculator HELP !
« Reply #4 on: August 10, 2010, 10:42:52 pm »
I believe mich is getting into the soldat scripting scene, and delphi uses pretty much the same language (object pascal). Plus delphi also uses a lot of visual placing controls on forms, so it is easy enought to pick up, at least I found it so.
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs