SO,I know that Pascal is really old,but we started it at school,and it's usefull,many languages are based on it.
.But. I wrote this
[code]Program Boxy;
Uses Crt;
Var Counter : Integer; {loop counter}
Begin
For Counter := 1 to 5 do
Begin
gotoxy(25, 5 + Counter);
Writeln('I');
End;
For Counter := 5 Downto 1 do
Begin {an example of 'downto' instead of
'to', note the 'gotoxy(_,_)'}
gotoxy(32, 11 - Counter);
Writeln('I');
End;
For Counter := 1 to 6 do
Begin
gotoxy(25 + Counter, 11);
Writeln('-');
End;
For Counter := 6 Downto 1 do
Begin
gotoxy(32 - Counter, 5);
Writeln('-');
End;
{--------------The Corners(+)---------------}
Gotoxy(25,5);
Writeln('+');
GotoXy(25,11);
Writeln('+');
GotoXy(32,5);
Writeln('+');
GotoXy(32,11);
Writeln('+');
GotoXy(45,7);
Writeln('Just as simple as the for loop!!!');
Readln;
End.[/code]
it's supposed to make a little box out of ASCII characters
When I compile it,it seas that it was successful,But when I run it it gives me "Runtime error 200-devision by zero"...so what the f***** is wrong?
Thanks in adv. Croc:)
You are divinding by zero somewhere xD you can't do stuff like 1/0 cause thats infinity
[QUOTE=quincy18;17934335]You are divinding by zero somewhere xD you can't do stuff like 1/0 cause thats infinity[/QUOTE]
but where did I use "1/0"?
Well I don't know pascal but can't you debug it like in c++ (walk trough every line step by step)
[QUOTE=quincy18;17934526]Well I don't know pascal but can't you debug it like in c++ (walk trough every line step by step)[/QUOTE]
I did go trough every line,and I did so now too,but I can't see any thing.
I saw once something about Pascal having problems on fast PCs but I couldn't open the site:|
Mine's a coreduo 2Ghz
Edit: I agree with Bytheway
but thanks for trying to help Quincy18
[QUOTE=quincy18;17934335]You are divinding by zero somewhere xD you can't do stuff like 1/0 cause thats infinity[/QUOTE]
No it's not
[editline]10:05PM[/editline]
And he doesn't even have a "0" in his entire program, are you trying to be funny or something D:
well any one?
[QUOTE=bytheway;17934611]No it's not
[editline]10:05PM[/editline]
And he doesn't even have a "0" in his entire program, are you trying to be funny or something D:[/QUOTE]
There doesn't need to be a zero. A variable could have the value of 0.
I don't know Pascal, could you show us the lines that include division? I can't find them.
[QUOTE=PvtCupcakes;17935683]There doesn't need to be a zero. A variable could have the value of 0.
I don't know Pascal, could you show us the lines that include division? I can't find them.[/QUOTE]
There's no division in the whole thing. Any way division's like this
[code]
A/B -or- A:=A/B -the / is for division [/code]
Why is this so hard,I wrote the thing and compiled it in 5 min.and then lost the past 3 hours trying to fix the error.
I tried reinstalling pascal,I tried to find a never version(now I have "Turbo pascal 7.0"),I despised it,I tried set affinity on it,,but to no avail.
Edit:I'm going to bed,I lost enough time,as it is.
the compiler should point out the buggy line
[QUOTE=Eudoxia;17944273]the compiler should point out the buggy line[/QUOTE]
It's a runtime error...
And use a debugger. It'll tell you exactly where the error comes from.
[QUOTE=bytheway;17934611]No it's not
[editline]10:05PM[/editline]
And he doesn't even have a "0" in his entire program, are you trying to be funny or something D:[/QUOTE]
You can divide by zero without using a 0, you know: 1/(a-a)
Running Linux, and it compiles & runs the way it should:
[IMG]http://i34.tinypic.com/1zcmh7d.png[/IMG]
[QUOTE=bytheway;17934611]No it's not
[editline]10:05PM[/editline]
And he doesn't even have a "0" in his entire program, are you trying to be funny or something D:[/QUOTE]
No, I'm not that good in pascal and I didn't look trough the code, I was just trying to point out in simple words what the compiler was saying.
[QUOTE=Eudoxia;17945491]Running Linux, and it compiles & runs the way it should:
[IMG]http://i34.tinypic.com/1zcmh7d.png[/IMG][/QUOTE]
Ok then it's my PC,or pascal,That's good :) but what now?I can't find a path or something.
Thanks all for the your time:)
I think that there isn't any past 7.0.
...but,I don't get it,witch file should I patch?where it asks for a full name.
[QUOTE=windwakr;17947695]Try this:
[url]http://sta.c64.org/dosprg/t7tplfix.zip[/url]
Follow the directions in the readme and it will patch the actual files that Pascal uses, so any new EXE's made will run fine.[/QUOTE]
You,sir,are all,but a noob! That fixed it :D
And let me thank every one else too,for their time,too :)
Thanks all
[QUOTE=noctune9;17945435]You can divide by zero without using a 0, you know: 1/(a-a)[/QUOTE]
No you can't.
[QUOTE=I am a noob;17958105]No you can't.[/QUOTE]
[url]http://www.wolframalpha.com/input/?i=1/0[/url]
Where's your god now?
[QUOTE=I am a noob;17958105]No you can't.[/QUOTE]
Actually this guy is right. a-a [b]is[/b] 0.
[editline]06:47PM[/editline]
Disregard, I missed the joke.
[QUOTE=ZeekyHBomb;17959568][url]http://www.wolframalpha.com/input/?i=1/0[/url]
Where's your god now?[/QUOTE]
Science - 1 | God - 0
[QUOTE=TheCroc;17947963]You,sir,are all,but a noob! That fixed it :D
And let me thank every one else too,for their time,too :)
Thanks all[/QUOTE]
Well you can always switch compilers
Borland Pascal is a bit outdated (But Borland Delphi will compile Pascal code).
On Windows I use Free Pascal and Dev-Pascal (An IDE for Free Pascal).
On Linux I use Geany (And that IDE compiles through Free Pascal for Linux).
Thanks,for the info,I'll look for the compilers,if I have time,for now I'll stay with this one.
I use Lazarus.
[font=Tahoma][size=4]SAN FRANCISCO, California -- Google on Thursday declared the worst of the recession over and paved the way for a return to heavy spending on expansion as it reported a surprisingly strong 8 per cent jump in net revenues [url=http://www.polofr.net/][color=#1c57c7]Ralph Lauren t shirt Femme[/color][/url] in its latest quarter.The optimism reflected what the company said was an across-the-board recovery in online advertising, with even the struggling financial services sector showing a return to growth. While search engine advertising has held up better than most other forms of online media in the downturn, Eric Schmidt, chief executive, [url=http://www.polofr.net/ralph-lauren-homme-c-23.html][color=#1c57c7]Ralph Lauren t shirt Homme[/color][/url] said the advertising revival appeared to have spread across the internet more broadly.The news pushed the company's shares up 3 per cent in after-market trading, to $544, capping a run that has seen the shares climb 120 per cent from the bottom late last year.The figures for the three months to [url=http://www.polofr.net/lacoste-polo-femme-c-22.html][color=#1c57c7]lacoste polo t shirt Femme[/color][/url] the end of September point to a return to sequential quarterly growth for the search giant after two periods in which its revenues were either flat or down from the preceding quarter, the first time in its 10-year history it had been through such a decline. Investors often pay close attention to sequential quarterly comparisons for high-growth companies since they provide a more immediate view of the growth trajectory.Drawing a clear line after the downturn, Mr Schmidt praised the company's management team for holding down costs in recent [url=http://www.polofr.net/lacoste-polo-homme-c-21.html][color=#1c57c7]Lacoste polo Homme[/color][/url] quarters but said the time had come for a return to the company's earlier ambitious expansion path.[/size][/font]
Sorry, you need to Log In to post a reply to this thread.