Contoh Program Sederhana :

Dalam ( Bahasa Pascal )

Hitung_luas := Panjang * Lebar ;

x := 1000 ;

ulang := False ;

Luas_Lingkaran := 3,14 * Jari * jari ;

Nama := Achmad ;

Analisa Leksikal nya..:

– 1000, False, 3,14, ‘Achmad’ = Berupa “NIlai Konstanta

– Hitung_Luas, Panjang, Lebar, X, Ulang , Luas_Lingkaran, Jari-Jari = Berupa ” Identifier Variabel

– ‘ * ‘ = Berupa ” Operator Aritmatika

– ‘ = ‘ = Berupa ” Operator Logika

– ‘ : ,dan ; ‘ = Berupa ” Delimineter / Pembatas

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s