Archive for October 2014
Pascal-Basic Programming
Welcome back Any body , I'll try to give some my experience that i have get in my college. may i can tell you not many but because i just know some knowledge from this programming. let's start :)
in Pascal to declaration name of program use this code :
program <Name_of_program>; {remember to write name of program please DON'T try to put space, just use underscore to space beetwen name }
dont forget to put ; behing the code to end the command line;
for example to show some text hello on screen do this :
write('Hello Body, :)'); {this option will be executed if you use library standard. it was or wincrt}
next , in many programming have some rule that you have save some input in variable. that was like in pascal. to declare variable in pascal like this :
var
g : integer; {don't forget to give ; in last command line}
i give some simple program in pascal :
program print_Hello;
uses crt;
begin
wruiteln('Hello word');
readln;
end.
this a simple program to get show on screen hello and word. so we are think the program can show hello and word that it can show some numerics??? it can just type like this beetwen begin - end.
writeln('8 + 7 = 15'); it will shown but type of the number not integer it was character on string. string was set of char that pack in one type to be string it self. example :
char = 't','g'.'6'.
string = 'tg6'.
//Understood ?? so easy okay??? if the type of numerical is string not integer or real '78' it defferent than 78. if i print on screen '78'+'5' it make some mistake not like 78 + 5 that have a result 83. so i hope you'll be understand what i have told you about basicly of pascal.
next , in many programming have some rule that you have save some input in variable. that was like in pascal. to declare variable in pascal like this :
var
g : integer; {don't forget to give ; in last command line}
i give some simple program in pascal :
program print_Hello;
uses crt;
begin
wruiteln('Hello word');
readln;
end.
this a simple program to get show on screen hello and word. so we are think the program can show hello and word that it can show some numerics??? it can just type like this beetwen begin - end.
writeln('8 + 7 = 15'); it will shown but type of the number not integer it was character on string. string was set of char that pack in one type to be string it self. example :
char = 't','g'.'6'.
string = 'tg6'.
//Understood ?? so easy okay??? if the type of numerical is string not integer or real '78' it defferent than 78. if i print on screen '78'+'5' it make some mistake not like 78 + 5 that have a result 83. so i hope you'll be understand what i have told you about basicly of pascal.
i 'll be back soon.
LISP - Function in function
Wah sudah mahir ni ya masuk ketahap ini hehhe :D sebenarnya ndak terlalu ribet untuk session ini :D
LHO kok BISA ?????
wong kamu tahu definisi defun apa?????
defun = definition function //WOW berarti sudah function donk ???? iya benar :D
misal ni aku punya fungsi mat1.
(defun mat1()
(+ 5 6)
)
saya punya fungsi lagi dan memanggil fungsi sebelumnya
(defun dol()
(+ 8 mat1)
)
berapa hasilnya ????? hayoooo :D
Hasilnya adalah : 19 :D sip
LHO kok BISA ?????
wong kamu tahu definisi defun apa?????
defun = definition function //WOW berarti sudah function donk ???? iya benar :D
misal ni aku punya fungsi mat1.
(defun mat1()
(+ 5 6)
)
saya punya fungsi lagi dan memanggil fungsi sebelumnya
(defun dol()
(+ 8 mat1)
)
berapa hasilnya ????? hayoooo :D
Hasilnya adalah : 19 :D sip


