Here we go.
Printable View
Here we go.
This counts as a tutorial??
I dunno what "turbo"pascal is like but actually ChrisWuk, I would consider this to be a tutorial. It shows the basics of a small hello world type program. Though it is very small its enought to get used to the structure of some of the sub programs used in pascal. You see in the 80s all you needed to do was measure what size & position you want everything to be in, then type your code into a text-editor, after that compile and run. If this were.... ummm... lets say VC++ or VB he would have probably writen 10 pages on where to point and click, or how to drag, drop, & code or where to find some menu to change the properties and componets...
If your a PC book junkie like I am you'll also notice that almost all beginers' programing guides/books start out with explaining how sub programs & functions work then how to make some type of a hello world program like this one.
I think that is a tutorial ,thats good for a newbe ....
I had to take a class in Turbo Pascal. . .horrible prof so I didn' retain all that much, but I remember that we had to use 'writeln' for output. . .are there some header includes that allow you to use just write?? Well I'm sure there are, but what are they, please??
Pascal and therefore turbo Pascal are considered learning languages, as such they are a little limited, you cant include anything. There is no include statement, no header files ect.
The way we reused code in Pascal was to create a file with useful code bits and then copy and paste into programs :)
so unless you want to create a new print statement (using writeln) you are stuck with it.
See, ya know that's what I thought, but he just uses write() in his example.. .hmmmm, oh well. So the tut should actually read
Begin
WriteLn ('Hello World');
End.
Writeln and write do the same thing except that writeln will go to the next line, and write will just keep spitting stuff out in one line. Writeln is good if you're writing a paragraph, and don't want pascal to cut off your sentences, so you cut them off yourself. But, I was writing one line here so I used write instead of writeln.Quote:
'writeln' for output
Ah, the beauty of pascal. Everything relies on the compiler, and there are many of them. I believe the latest version is Turbo Pascal 7, and it does allow you to include files. I'm fairly sure of that, I've heard of people doing that. I still have to try it, I just don't use Turbo Pascal 7, but I'm hoping to check that out soon.Quote:
you cant include anything. There is no include statement, no header files ect.
Ah ha, kewl, thanks for giving me the answer to my question. :)
Geeze... I feel I don't understand something...
All my life I've been including files (USES directive), and I didn't try not using it. I thought that's obligatory...
Anyway, I'm up to Cpp now, so I won't try to not-use USES (he-he).
By the way, the latest ver is (I suppose) v7.1. Procs with PII (or higher) architecture can't use TP v7.0 because of a VERY serious bug. So, if ye need a Pascal compilator on a PII or some Duron, you'll just HAVE to use v7.1. Just in case somebody didn't know.