pertemuan ke 12 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
PERTEMUAN KE 12 PowerPoint Presentation
Download Presentation
PERTEMUAN KE 12

Loading in 2 Seconds...

play fullscreen
1 / 14

PERTEMUAN KE 12 - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

PERTEMUAN KE 12. BAHAN PRAKTIKUM MINGGU Ke 12. SUB PROGRAM & SUB PROCEDURE. Untuk menggabung Fungsi Program dengan Sistem Menu baik Menu Tunggal maupun Menu Berlapis bisa dengan : Sub Program atau Sub Procedure. Sub Program.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'PERTEMUAN KE 12' - preston-mcfadden


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
pertemuan ke 12

PERTEMUAN KE 12

BAHAN PRAKTIKUM MINGGU Ke12

sub program sub procedure
SUB PROGRAM & SUB PROCEDURE

UntukmenggabungFungsi Program denganSistem Menu baik Menu Tunggal maupun Menu Berlapisbisadengan :

Sub Program atau

Sub Procedure

sub program
Sub Program

UntukSub Program terdiridari Menu Utamadengan File . Exe danFungsi Program dengan File . Tbc

Jumlah File terdiridarisatufile.Exedan n file .Tbc yang jumlahtergantungbanyaknyaFungsi Program.

Pada File .Exe menulis CHAIN NAMAFILE.TBC

Pada Masing2 File.Tbcmenulis CHAIN NAMAFile.Exe

sub procedure
Sub Procedure

Menu Utama yang berfungsimenjalankanpilihanfungsi program, dansemuafungsi program disimpandalamsatu file.bas

BENTUK UMUMNYA :

SUB NAMA FILE

END SUB NAMA FILE

CALL NAMA FILE

fungsi program
FUNGSI PROGRAM

Fungsi Program terdiridari :

1. Fungsi INPUT

2. Fungsi Edit

3. FungsiTambah

4. FungsiLihat

5. FungsiCetak

6. FungsiLaporan

7. FungsiHapus

bagan program fungsi input
Bagan Program Fungsi Input :
  • CLS
  • DIM ....... DI ISI SESUAI DEGAN FIELD YANG ADA PADA PEKERJAAN
  • NOMORFILE1% = 1
  • PRINT " NAMA FILE : "; : INPUT, NAMAFILE$
  • PRINT " JUMLAH DATA : "; : INPUT, N
  • FOR I = 1 TO N
  • PRINT " ......... ";I;" = " ; : INPUT , ....(I)
  • GUNAKAN PERINTAH PRINT, INPUT DAN BERSYARAT UNTUK SEMUA FIELD YANG ADA PADA DIM
  • NEXT I
  • OPEN NAMAFILE$ FOR OUTPUT AS #NOMORFILE1%
  • WRITE #NOMORFILE1%, N
  • FOR I = 1 TO N
  • WRITE #NOMORFILE1%, I, ........
  • NEXT I
  • CLOSE #NOMORFILE1%
bagan program untuk fungsi laporan
Bagan Program untukFungsiLaporan
  • 50 DIM ...................................
  • NOMORFILE1% = 1
  • ON ERROR GOTO 100
  • PRINT " NAMA FILE = "; : INPUT, NAMAFILE$
  • CLS
  • OPEN NAMAFILE$ FOR INPUT AS #NOMORFILE1%
  • INPUT #NOMORFILE1%, N
  • FOR I = 1 TO N
  • INPUT #NOMORFILE1%, I, .............................
  • NEXT I
  • LOCATE 1,25 : PRINT " DAFTAR NILAI SISWA "
  • LOCATE 3,10 : PRINT STRING$(50,"~")
  • LOCATE 4,10 : PRINT " "
  • LOCATE 4,30 : PRINT " "
slide8

LOCATE 4,50 : PRINT " "

  • LOCATE 5,10 : PRINT STRING$(50,"~")
  • BRS=6
  • FOR I = 1 TO N
  • LOCATE BRS,10 : PRINT ......(I)
  • LOCATE BRS,30 : PRINT .......(I)
  • LOCATE BRS,50 : PRINT ........(I)
  • BRS=BRS+1
  • NEXT I
  • LOCATE BRS+2,10: PRINT STRING$(50,"~")
  • CLOSE #NOMORFILE1% :END
  • 100 BEEP
  • RESUME 50
bagan program untuk fungsi edit
Bagan Program untukFungsi Edit
  • CLS
  • 150 DIM .........................
  • NOMORFILE1% = 1
  • ON ERROR GOTO 100
  • PRINT " NAMA FILE : "; : INPUT, NAMAFILE$
  • CLS
  • OPEN NAMAFILE$ FOR INPUT AS #NOMORFILE1%
  • INPUT #NOMORFILE1%, N
  • FOR I = 1 TO N
  • INPUT #NOMORFILE1%, I, ......................
  • NEXT I
  • PRINT "JUMLAH DATA = " ; N
  • 170 FOR I = 1 TO N
  • PRINT "DATA YANG DI UBAH DATA KE = " ; : INPUT, I
slide10

CLS

  • PRINT "DATA SEBELUM DIUBAH : " ;I;" = " ; ........(I)
  • PRINT "DATA YANG MAU DIUBAH : "; : INPUT, .......(I)
  • 175 PRINT "STOP/LANJUTKAN (S/L) : "; : INPUT SL$
  • IF UCASE$(SL$) <> "S" AND UCASE$(SL$) <> "L" GOTO 175
  • IF UCASE$(SL$) = "L" THEN 170
  • IF UCASE$(SL$) = "S" THEN 190
  • 180 NEXT I
  • 190 CLOSE #NOMORFILE1%
  • OPEN NAMAFILE$ FOR OUTPUT AS #NOMORFILE1%
  • WRITE #NOMORFILE1%, N
  • FOR I = 1 TO N
  • WRITE #NOMORFILE1%, I, .........
  • NEXT I
  • CLOSE #NOMORFILE1% : END
  • 200 BEEP
  • RESUME 150
bagan program untuk fungsi lihat
Bagan Program untukFungsiLihat
  • CLS
  • 250 DIM .........................
  • NOMORFILE1% = 1
  • ON ERROR GOTO 100
  • PRINT " NAMA FILE : "; : INPUT, NAMAFILE$
  • CLS
  • OPEN NAMAFILE$ FOR INPUT AS #NOMORFILE1%
  • INPUT #NOMORFILE1%, N
  • FOR I = 1 TO N
  • INPUT #NOMORFILE1%, I, ......................
  • NEXT I
  • PRINT "JUMLAH DATA = " ; N
  • 270 FOR I = 1 TO N
  • PRINT "DATA YANG INGIN Di LIHAT : " ; : INPUT, I
slide12

275 PRINT “LIHAT DATA LAIN : "; : INPUT SL$

  • IF UCASE$(SL$) <> "S" AND UCASE$(SL$) <> "L" GOTO 275
  • IF UCASE$(SL$) = "L" THEN 270
  • IF UCASE$(SL$) = "S" THEN 290
  • 280 NEXT I
  • 290 CLOSE #NOMORFILE1%
  • OPEN NAMAFILE$ FOR OUTPUT AS #NOMORFILE1%
  • WRITE #NOMORFILE1%, N
  • FOR I = 1 TO N
  • WRITE #NOMORFILE1%, I, .........
  • NEXT I
  • CLOSE #NOMORFILE1% : END
  • 300 BEEP
  • RESUME 150
bagan program untuk fungsi tambah
Bagan Program untukFungsiTambah
  • CLS
  • DIM ..................................
  • NOMORFILE1% = 1
  • 350 PRINT " NAMA FILE = "; : INPUT, NAMAFILE$
  • CLS
  • OPEN NAMAFILE$ FOR INPUT AS #NOMORFILE1%
  • INPUT #NOMORFILE1%, N
  • FOR I = 1 TO N
  • INPUT #NOMORFILE1%, I, .....................
  • NEXT I
  • CLOSE #NOMORFILE1%
  • PRINT " JUMLAH DATA SEBELUMNYA : ";N
  • PRINT " DATA YANG DITAMBAHKAN : "; : INPUT NN
  • NNN = N + NN
slide14

FOR I = N+1 TO NNN

  • PRINT " ...........KE " ;I;" = "; : INPUT, ........(I)
  • NEXT I : PRINT
  • FOR I = 1 TO NNN
  • PRINT " ...... ";I;" = "; .......(I)
  • NEXT I
  • OPEN NAMAFILE$ FOR OUTPUT AS #NOMORFILE1%
  • WRITE #NOMORFILE1%, NNN
  • FOR I = 1 TO NNN
  • WRITE #NOMORFILE1%, I, .....................
  • NEXT I
  • CLOSE #NOMORFILE1% : END