I read that I can't use Integer datatype for decimals, and after I changed the decimals to whole numbers, I stopped getting the errors.
Str didn't give me any errors, however I am having problem with some of my if statements , and maybe that could be the reason.
Thanks for your help, Glenn...
I am trying to do the following expression and receive an error:
damage := (str*2.5)-(.5*marmor);
and i get an error like this: [ or .) needed.
Can anyone please help?
Thanks!
Thanks everyone.
earthandfire, I tried your procedure, but it is still not working for me. My cursor isn't moving when I press "A". Is there something you missed or I missed? Current code with your modification:
program stupid;
uses crt;
var
arrowkey : char;
x, y : integer;
tmp : char...
Hi folks. I'm pretty new to pascal 7.0 and desire help if any are willing.
What I'm trying to do:
When a user presses "a", the cursor will move 5 spaces to the right. If I replace the last 'x' in the last 'gotoxy' with '10', the program works. But I need the function to return the value of X...
program myst;
uses crt;
var name: string;
pref: byte;
yn1: char;
(*procedure name_prefix; forward;*)
procedure enter_name;
begin
clrscr;
TextColor(3);
writeln ('Welcome to Mystrunner. Before we get any further, ');
writeln ('please enter the name you wish to...
(not the whole code)
program myst;
uses crt;
yn1 : char; <---variable for yes or no
(*------------------------*)
procedure enter_name;
begin
writeln ('Do you like this name?');
yn1 := GetKey;
readln (yn1)
If yn1 = #78 then enter_name;
if yn1 = #89 then name_pref...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.