SRL Archive - First Scripts

My first (form) script


All that is man

2009-09-30 07:01:49

Alrighty guys, I've been taking a liking to forms, and this is what I came up with. Its a calculator, I know there's probally and easier to do this. But hey its my first :P. So tell me what you think. :)

Current Version := 1.0;

YoHoJo

2009-09-30 07:18:27

12345679*9 gives me 0 when it should give 111 111 111

Goodjob with the from though i like it. You should make keys that correspond to number too, so you can use it with only a mouse. And maybe eventually make it a scientific calculator! Good job on it! :D

All that is man

2009-09-30 07:20:27

From: YoHoJo
12345679*9 gives me 0 when it should give 111 111 111

Goodjob with the from though i like it. You should make keys that correspond to number too, so you can use it with only a mouse. And maybe eventually make it a scientific calculator! Good job on it! :D


Thats because it only supports 9999*9999

for i:= 0 to 9999 do
if(StrToInt(edFirst.text) = i)then
intFirst := i;
for i:= 0 to 9999 do
if(StrToInt(edSecond.text) = i)then
intSecond := i;
Or else it laggs really really badly and isn't fun to use
i've also tried using TButtons like 1..9 but i had some issues with that sorry

Thanks for the input though

Sandstorm

2009-09-30 07:22:33

Not bad, take a look at how I did mine (I used two arrays, numbers and strings, then did a for to do loop to the high of the numbers, and took the operation stored in the string, and applied it to the two numbers). I think it works quite well, and the only problem is it doesn't follow BEDMAS.

http://www.villavu.com/forum/showthread.php?t=42671

All that is man

2009-09-30 07:26:04

From: Sandstorm
Not bad, take a look at how I did mine (I used two arrays, numbers and strings, then did a for to do loop to the high of the numbers, and took the operation stored in the string, and applied it to the two numbers). I think it works quite well, and the only problem is it doesn't follow BEDMAS.

http://www.villavu.com/forum/showthread.php?t=42671


yours > mine lolol nice

edit i'm having a bad day sorry for the short reply

Quickmarch

2009-09-30 13:48:38

Change the Integers to Extendeds (FloatToStr, etc) so you can modify much higher numbers.