1 / 3

GOTO

Statemen GOTO digunakan untuk melompat ke lokasi label yang telah ditentukan. Label ini harus berada dalam satu fungsi atau skrip. Nama label ini harus diawali dengan teks. GOTO. Contoh : GOTO x2 X1: Beeb(1) x2: lakukanSesuatu() //Pangil fungsi

keisha
Télécharger la présentation

GOTO

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Statemen GOTO digunakan untuk melompat ke lokasi label yang telah ditentukan. Label ini harus berada dalam satu fungsi atau skrip. Nama label ini harus diawali dengan teks GOTO Contoh : GOTO x2 X1: Beeb(1) x2: lakukanSesuatu() //Pangil fungsi Pada contoh di atas, GOTO melompat ke x2 dan tidak melaksanakan statemen Beeb(1)

  2. HALT Statemen ini digunakan agar aplikasi berhenti. Hal ini biasanya digunakan untuk mengakhiri aplikasi setelah terjadi error yang serius Contoh : GOTO x2 X1: Beeb(1) x2: lakukanSesuatu() //Pangil fungsi Pada contoh di atas, GOTO melompat ke x2 dan tidak melaksanakan statemen Beeb(1)

  3. RETURN Statemen RETURN menyebabkan skrip atau event diakhiri dan kembali ke kontrol pemangilnya. Dalam sebuah fungsi Anda dapat menggunakan RETURN untuk mengembalikan nilai dari fungsi tersebut Contoh : Hasil = nilai1 * nilai2 RETURN Hasil

More Related