SlideShare a Scribd company logo
1 of 29
ARRAY
BY : SITI MARIYAH, SST
ARRAY
Contoh array 1 dimensi:
kelasku(1,5) = {“1A”, “1B”, “1C”, “1D”, “1E”}
Data 5 kelas dimasukkan dalam satu array yang
bernama kelas.
Contoh array 2 dimensi :
kelasku(2, 3) = {(“1A”, “1B”, “1C”),(“1E”, “1F”,
“1G”)}
DIMENSION COMMAND
Logic :
DIMENSION ArrayName1(nRows1 [, nColumns1])
[AS Type] [, ArrayName2(nRows2 [,nColumns2])]
PARAMETER
1. ArrayName1  nama array
Kita bisa membuat multiple array dengan
satu dimensi hanya dengan menambahkan
nama array.
Contoh :
DIMENSION arrayName..,arrayName2…,arrayName3…
PARAMETER(2)
2. nRows1 [,nColumns1]  jumlah baris dan
kolom array
Contoh :
DIMENSION arraySatu(10)  array 1 dimensi dengan
10 baris dan 1 kolom
DIMENSION arraySatu(2,4)  array 2 dimensi
dengan 2 baris dan 4 kolom
DEKLARASI ARRAY
Contoh deklarasi :
DIMENSION arraySatu(10), arrayDua[2,4], arrayTiga(3,3)
DIMENSION arraySatu[10], arrayDua(2,4), arrayTiga[3,3]
Ukuran array tergantung pada banyaknya elemen yang
disimpan dalam array tersebut. Elemen array dapat
memiliki tipe data apa saja dan diinisialisasi False (.F.)
untuk pertama kali.
OPERASI ARRAY
STORE TO : Untuk menginisialisasi semua elemen
dengan nilai yang sama.
Contoh :
DIMENSION arraySatu(10,3)
STORE “initial” TO arraySatu
Logic di atas untuk menyimpan string initial ke
arraySatu. Sehingga initial menjadi elemen pertama
(baris1,kolom1) arraySatu
OPERASI ARRAY(2)
Array Subscript : digunakan untuk mengakses dan
manipulasi elemen array.
 Selain array subscript bisa juga menggunakan nama
array dan indeks.
 Pada array 1 dimensi, subscript digunakan untuk
mengidentifikasi nomor baris array. Contoh, subscript
untuk elemen yang berada di baris ketiga adalah 3
 Pada array 2 dimensi, subscript digunakan untuk
mengidentifikasi elemen array. Subscript yang pertama
menyatakan baris, subscript kedua menyatakan kolom
OPERASI ARRAY(3)
DIMENSION arrayName[5,2]
arrayName[1,2] = 966789
 Creates a one- or two-dimensional array.
 Visual FoxPro arrays are one-based
 DIMENSION is identical in operation and similar in
syntax to the DECLARE command
 Copies elements from one array to another array.
 Deletes an element from a one-dimensional array, or a
row or column from a two-dimensional array.
 Adds one record to the currently selected table for each
row in an array and fills each record with data from the
corresponding array row.
 Copies data from the currently selected table to an array.
 Executes the first set of commands whose conditional
expression evaluates to true (.T.).
Contoh
STORE CMONTH(DATE()) TO month
DO CASE
CASE INLIST(month, 'January', 'February', 'March')
STORE 'first quarter' TO rpt_title
CASE INLIST(month, „April', „May', „June')
STORE „second quarter' TO rpt_title
CASE INLIST(month, 'July', „August', „September')
STORE „third quarter' TO rpt_title
OTHERWISE
STORE „fourth quarter' TO rpt_title
ENDCASE
WAIT WINDOW rpt_title NOWAIT
 Executes a set of commands within a conditional loop.
 Exits a DO WHILE, FOR, SCAN, or
TRY…CATCH…FINALLY structure.
Contoh
CLOSE DATABASES OPEN DATABASE (HOME(2) + 'Datatestdata')
USE products && Opens Products table
SET TALK OFF
gnStockTot = 0
DO WHILE .T. && Begins loop
IF EOF( )
EXIT
ENDIF
IF unit_price < 20
SKIP LOOP
ENDIF
gnStockTot = gnStockTot + in_stock
SKIP
ENDDO && Ends loop
CLEAR
? 'Total items in stock valued over 20 dollars:'
?? gnStockTot
 Executes a set of commands for each element in a Visual
FoxPro array or collection.
Contoh
DIMENSION cMyArray(3)
cMyArray[1] = 'A'
cMyArray[2] = 'B'
cMyArray[3] = 'C'
FOR EACH cMyVar IN cMyArray
? cMyVar
ENDFOR
 Executes a set of commands a specified number of
times.
Contoh
FOR gnCount = 1 TO 10
? gnCount
ENDFOR
Contoh
OPEN DATABASE (HOME(2) + 'DataTestData')
USE Customer
FOR gnCount = 1 TO 10 STEP 2
GOTO gnCount
DISPLAY Company
ENDFOR
 Conditionally executes a set of commands based on the
value of a logical expression.
Contoh
USE Customer && Open customer table
GETEXPR „ Enter condition to locate ' TO gcTemp;
TYPE 'L' DEFAULT „ COMPANY = ""' LOCATE
FOR &gcTemp && Enter LOCATE expression
IF FOUND( ) && Was it found?
DISPLAY && If so, display the record
ELSE && If not found
? 'Condition ' + gcTemp + ' was not found '
&&Display a message
ENDIF
 Returns program control directly to the beginning of a
looping structure.
 Moves the record pointer through the currently selected
table and executes a block of commands for each record
that meets the specified conditions.

More Related Content

What's hot

What's hot (20)

The Ring programming language version 1.5.2 book - Part 22 of 181
The Ring programming language version 1.5.2 book - Part 22 of 181The Ring programming language version 1.5.2 book - Part 22 of 181
The Ring programming language version 1.5.2 book - Part 22 of 181
 
The Ring programming language version 1.3 book - Part 13 of 88
The Ring programming language version 1.3 book - Part 13 of 88The Ring programming language version 1.3 book - Part 13 of 88
The Ring programming language version 1.3 book - Part 13 of 88
 
5. R basics
5. R basics5. R basics
5. R basics
 
10. Getting Spatial
10. Getting Spatial10. Getting Spatial
10. Getting Spatial
 
Data manipulation on r
Data manipulation on rData manipulation on r
Data manipulation on r
 
R Programming: Numeric Functions In R
R Programming: Numeric Functions In RR Programming: Numeric Functions In R
R Programming: Numeric Functions In R
 
The Ring programming language version 1.5.3 book - Part 23 of 184
The Ring programming language version 1.5.3 book - Part 23 of 184The Ring programming language version 1.5.3 book - Part 23 of 184
The Ring programming language version 1.5.3 book - Part 23 of 184
 
Dplyr and Plyr
Dplyr and PlyrDplyr and Plyr
Dplyr and Plyr
 
Stack queue
Stack queueStack queue
Stack queue
 
Stack and queue
Stack and queueStack and queue
Stack and queue
 
Rsplit apply combine
Rsplit apply combineRsplit apply combine
Rsplit apply combine
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Spark
 
The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84
 
Data made out of functions
Data made out of functionsData made out of functions
Data made out of functions
 
PAIP 第1章 Lisp入門
PAIP 第1章 Lisp入門PAIP 第1章 Lisp入門
PAIP 第1章 Lisp入門
 
CSE240 Doubly Linked Lists
CSE240 Doubly Linked ListsCSE240 Doubly Linked Lists
CSE240 Doubly Linked Lists
 
Data import-cheatsheet
Data import-cheatsheetData import-cheatsheet
Data import-cheatsheet
 
Stack, queue and hashing
Stack, queue and hashingStack, queue and hashing
Stack, queue and hashing
 
The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 10 of 84The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 10 of 84
 
The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 11 of 84The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 11 of 84
 

Viewers also liked

SHS Library Annual Report 2011-2012
SHS Library Annual Report 2011-2012SHS Library Annual Report 2011-2012
SHS Library Annual Report 2011-2012
rudimyers
 
AFS Bay Area 2011-2012
AFS Bay Area 2011-2012AFS Bay Area 2011-2012
AFS Bay Area 2011-2012
Anna_AFS
 
Tutorial tukar template blog
Tutorial tukar template blogTutorial tukar template blog
Tutorial tukar template blog
Siti Sujimah Omar
 
6th Arab Hr Conference
6th Arab Hr Conference6th Arab Hr Conference
6th Arab Hr Conference
reemana
 

Viewers also liked (16)

SHS Library Annual Report 2011-2012
SHS Library Annual Report 2011-2012SHS Library Annual Report 2011-2012
SHS Library Annual Report 2011-2012
 
Kbsr
KbsrKbsr
Kbsr
 
Pemrograman Terstruktur 2
Pemrograman Terstruktur 2Pemrograman Terstruktur 2
Pemrograman Terstruktur 2
 
Bagaimana letak kod html
Bagaimana letak kod htmlBagaimana letak kod html
Bagaimana letak kod html
 
AFS Bay Area 2011-2012
AFS Bay Area 2011-2012AFS Bay Area 2011-2012
AFS Bay Area 2011-2012
 
Pemrograman Terstruktur 3
Pemrograman Terstruktur 3Pemrograman Terstruktur 3
Pemrograman Terstruktur 3
 
Pemrograman Terstruktur
Pemrograman TerstrukturPemrograman Terstruktur
Pemrograman Terstruktur
 
Trabajo BD
Trabajo BDTrabajo BD
Trabajo BD
 
Tutorial tukar template blog
Tutorial tukar template blogTutorial tukar template blog
Tutorial tukar template blog
 
CEST - Código Especificador da Substituição Tributária
CEST - Código Especificador da Substituição TributáriaCEST - Código Especificador da Substituição Tributária
CEST - Código Especificador da Substituição Tributária
 
LALUR: Revisando a parte A, entendendo a parte B
LALUR: Revisando a parte A, entendendo a parte BLALUR: Revisando a parte A, entendendo a parte B
LALUR: Revisando a parte A, entendendo a parte B
 
6th Arab Hr Conference
6th Arab Hr Conference6th Arab Hr Conference
6th Arab Hr Conference
 
Slideshow
SlideshowSlideshow
Slideshow
 
Materi Determinan (STIS)
Materi Determinan (STIS)Materi Determinan (STIS)
Materi Determinan (STIS)
 
Guia do Planejamento Tributário [e-book]
Guia do Planejamento Tributário [e-book]Guia do Planejamento Tributário [e-book]
Guia do Planejamento Tributário [e-book]
 
La crisi del'300
La crisi del'300La crisi del'300
La crisi del'300
 

Similar to Pemrograman Terstruktur 4

Multi dimensional arrays
Multi dimensional arraysMulti dimensional arrays
Multi dimensional arrays
Aseelhalees
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
aroraopticals15
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-array
Deepak Singh
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technology
worldchannel
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson ArraysData Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
Maulen Bale
 

Similar to Pemrograman Terstruktur 4 (20)

Mysql
MysqlMysql
Mysql
 
2- Dimensional Arrays
2- Dimensional Arrays2- Dimensional Arrays
2- Dimensional Arrays
 
Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
 
ARRAYS
ARRAYSARRAYS
ARRAYS
 
Array 31.8.2020 updated
Array 31.8.2020 updatedArray 31.8.2020 updated
Array 31.8.2020 updated
 
Multi dimensional arrays
Multi dimensional arraysMulti dimensional arrays
Multi dimensional arrays
 
MA3696 Lecture 6
MA3696 Lecture 6MA3696 Lecture 6
MA3696 Lecture 6
 
Array
ArrayArray
Array
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
 
Arrays
ArraysArrays
Arrays
 
Data structure array
Data structure  arrayData structure  array
Data structure array
 
Chap1 array
Chap1 arrayChap1 array
Chap1 array
 
R programming
R programmingR programming
R programming
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-array
 
Array,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN CArray,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN C
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technology
 
02 arrays
02 arrays02 arrays
02 arrays
 
Arrays in VbScript
Arrays in VbScriptArrays in VbScript
Arrays in VbScript
 
Arrays
ArraysArrays
Arrays
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson ArraysData Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 

Pemrograman Terstruktur 4

  • 1. ARRAY BY : SITI MARIYAH, SST
  • 2. ARRAY Contoh array 1 dimensi: kelasku(1,5) = {“1A”, “1B”, “1C”, “1D”, “1E”} Data 5 kelas dimasukkan dalam satu array yang bernama kelas. Contoh array 2 dimensi : kelasku(2, 3) = {(“1A”, “1B”, “1C”),(“1E”, “1F”, “1G”)}
  • 3. DIMENSION COMMAND Logic : DIMENSION ArrayName1(nRows1 [, nColumns1]) [AS Type] [, ArrayName2(nRows2 [,nColumns2])]
  • 4. PARAMETER 1. ArrayName1  nama array Kita bisa membuat multiple array dengan satu dimensi hanya dengan menambahkan nama array. Contoh : DIMENSION arrayName..,arrayName2…,arrayName3…
  • 5. PARAMETER(2) 2. nRows1 [,nColumns1]  jumlah baris dan kolom array Contoh : DIMENSION arraySatu(10)  array 1 dimensi dengan 10 baris dan 1 kolom DIMENSION arraySatu(2,4)  array 2 dimensi dengan 2 baris dan 4 kolom
  • 6. DEKLARASI ARRAY Contoh deklarasi : DIMENSION arraySatu(10), arrayDua[2,4], arrayTiga(3,3) DIMENSION arraySatu[10], arrayDua(2,4), arrayTiga[3,3] Ukuran array tergantung pada banyaknya elemen yang disimpan dalam array tersebut. Elemen array dapat memiliki tipe data apa saja dan diinisialisasi False (.F.) untuk pertama kali.
  • 7. OPERASI ARRAY STORE TO : Untuk menginisialisasi semua elemen dengan nilai yang sama. Contoh : DIMENSION arraySatu(10,3) STORE “initial” TO arraySatu Logic di atas untuk menyimpan string initial ke arraySatu. Sehingga initial menjadi elemen pertama (baris1,kolom1) arraySatu
  • 8. OPERASI ARRAY(2) Array Subscript : digunakan untuk mengakses dan manipulasi elemen array.  Selain array subscript bisa juga menggunakan nama array dan indeks.  Pada array 1 dimensi, subscript digunakan untuk mengidentifikasi nomor baris array. Contoh, subscript untuk elemen yang berada di baris ketiga adalah 3  Pada array 2 dimensi, subscript digunakan untuk mengidentifikasi elemen array. Subscript yang pertama menyatakan baris, subscript kedua menyatakan kolom
  • 10.  Creates a one- or two-dimensional array.  Visual FoxPro arrays are one-based
  • 11.  DIMENSION is identical in operation and similar in syntax to the DECLARE command
  • 12.  Copies elements from one array to another array.
  • 13.  Deletes an element from a one-dimensional array, or a row or column from a two-dimensional array.
  • 14.  Adds one record to the currently selected table for each row in an array and fills each record with data from the corresponding array row.
  • 15.  Copies data from the currently selected table to an array.
  • 16.  Executes the first set of commands whose conditional expression evaluates to true (.T.).
  • 17. Contoh STORE CMONTH(DATE()) TO month DO CASE CASE INLIST(month, 'January', 'February', 'March') STORE 'first quarter' TO rpt_title CASE INLIST(month, „April', „May', „June') STORE „second quarter' TO rpt_title CASE INLIST(month, 'July', „August', „September') STORE „third quarter' TO rpt_title OTHERWISE STORE „fourth quarter' TO rpt_title ENDCASE WAIT WINDOW rpt_title NOWAIT
  • 18.  Executes a set of commands within a conditional loop.
  • 19.  Exits a DO WHILE, FOR, SCAN, or TRY…CATCH…FINALLY structure.
  • 20. Contoh CLOSE DATABASES OPEN DATABASE (HOME(2) + 'Datatestdata') USE products && Opens Products table SET TALK OFF gnStockTot = 0 DO WHILE .T. && Begins loop IF EOF( ) EXIT ENDIF IF unit_price < 20 SKIP LOOP ENDIF gnStockTot = gnStockTot + in_stock SKIP ENDDO && Ends loop CLEAR ? 'Total items in stock valued over 20 dollars:' ?? gnStockTot
  • 21.  Executes a set of commands for each element in a Visual FoxPro array or collection.
  • 22. Contoh DIMENSION cMyArray(3) cMyArray[1] = 'A' cMyArray[2] = 'B' cMyArray[3] = 'C' FOR EACH cMyVar IN cMyArray ? cMyVar ENDFOR
  • 23.  Executes a set of commands a specified number of times.
  • 24. Contoh FOR gnCount = 1 TO 10 ? gnCount ENDFOR
  • 25. Contoh OPEN DATABASE (HOME(2) + 'DataTestData') USE Customer FOR gnCount = 1 TO 10 STEP 2 GOTO gnCount DISPLAY Company ENDFOR
  • 26.  Conditionally executes a set of commands based on the value of a logical expression.
  • 27. Contoh USE Customer && Open customer table GETEXPR „ Enter condition to locate ' TO gcTemp; TYPE 'L' DEFAULT „ COMPANY = ""' LOCATE FOR &gcTemp && Enter LOCATE expression IF FOUND( ) && Was it found? DISPLAY && If so, display the record ELSE && If not found ? 'Condition ' + gcTemp + ' was not found ' &&Display a message ENDIF
  • 28.  Returns program control directly to the beginning of a looping structure.
  • 29.  Moves the record pointer through the currently selected table and executes a block of commands for each record that meets the specified conditions.