At this shares is I am only explaining marginally concerning and pascal of tips writing of program. We start, ok? How Pascal program structure? Pascal consist...
...of 2 bodywork, that is variable declaration and his program. Paying attention example of :
1: my Program Me;
2: crt uses;
3: var is name of: string;
4: Begin
5: isn't it the name of you '); readln(nama);
6: clrscr; 7: write('Hi ', name of, ' apakabar?');
8: End.
Don'T thing of that program content. But pay attention his structure. At line to 3, that the so-called variable declaration shares. While from line fourth until 8, referred as part of statement ( place of write program). that First line only is his program title, do not in writing also may. Title of is " My me", don't isn't it the space of him ( use line under ).
In Pascal there is so-called other units a kind of library.. For example at used by both line of crt uses; ( functioning for the manipulation of text screen). Paying attention line 6, that is one of the function of unit of crt that is to clean screen ( is same by order of cls in PACK). Paying attention the way of writing of his program! Every line is always terminated with comma dot ";" ( except to of line fourth and 8, in consequence is sign from early and final of program). Besides pascal program is always started by " begin" and " end." ( don't forget his dot).
How, easy to is not? I is love one tips which good for. if write program labour the nattyness. Remember if (there are) any " Begin" sure exist " end", so writing of program among and begin of end that labour in love 2 space or one tab. Paying attention line of ke-5 until 7. That will facilitate searched of program when happened mistake. Recognition of enough until here. Ok !!!... : P.
Langganan:
Posting Komentar (Atom)
0 komentar
Posting Komentar