SlideShare uma empresa Scribd logo
1 de 13
PEMROGRAMAN TERSUTRKTUR
By: Siti Mariyah
MEMORY VARIABLES
firstName = “Tom”  create a cchracter memory
variable whose symbolic name shall be firstName
and assign to the string “Tom” to that variable
lastName= “Jerry”  create a cchracter memory
variable whose symbolic name shall be lastName
and assign to the string “Jerry” to that variable
Display memory  display local variables, foxpro
system variable, windows definition, menu
definition and pop-up windows definition
MEMORY VARIABLES (2)
?firstName  dipslay memory variable firstName
?lastName  dipslay memory variable lastName
?”Hello”  display character string-display Hello
?M.firstName  display memory variable
firstName
?M.lastName  display memory variable lastName
MEMORY VARIABLES (3)
noName = firstName  create a carachter memory variable whose symbolic name
shall be noName and assign the contents to the contents of variable firstName
Key = 5  creates a numeric memory variable whose symbolic name shall be Key and
assign 5 to that variable
Key = 5.5  creates a numeric memory variable whose symbolic name shall be Key
and assign 5.5 to that variable
Valid = .T.  create a logical memory varible whose symbolic name shall be Valid and
assigns True to that variable
Valid = NOT .F. create a logical memory varible whose symbolic name shall be Valid
and assigns True to that variable
myDay = {12/25/98}  creates a logical memory variable whose symbolic name shall
be myDay and assigns 12/25/98 to that variable
STRING FUNCTION AND
MANIPULATION
firstName = “tom”
lastName = “jerry”
noName = “john doe”
The + symbol is used to concatenate
(merge/combine) two or more strings
?”Hello” + firstName  display Hello tom
? firstName + lastName  display tomjerry
? firstName +’ ’+ lastName  display tom jerry
STRING FUNCTION AND
MANIPULATION (2)
UPPER FUNCTION
? ‘*‘ + Upper(firstName) + ‘+’  display [TOM]
? ‘*‘ + Upper(“good TimE”) + ‘+’  display [GOOD TIME]
totalName = firstName +’ ’+lastName  create a local
memory variable whose symbolic name shall be totalName
and assigns the contents to tom jerry
totalName = Upper(lastName)+’, ’+Upper(firstName ) 
create a local memory variable whose symbolic name shall be
totalName and assigns the contents to JERRY, TOM
STRING FUNCTION AND
MANIPULATION (3)
LOWER FUNCTION
firstName = “TOm”
lastName = “JERry”
noName = “john doe”
? ‘*‘ + Lower(firstName) + ‘+’  display [tom]
? ‘*‘ + Lower(“good TimE”) + ‘+’  display [good time]
totalName = firstName +’ ’+lastName  create a local memory variable
whose symbolic name shall be totalName and assigns the contents to tom
jerry
totalName = Upper(lastName)+’, ’+Upper(firstName )  create a local
memory variable whose symbolic name shall be totalName and assigns the
contents to JERRY, TOM
Operasi Tanggal dan Waktu
CDOW() : menghasilkan nama hari dalam bahasa inggris
Logic : ?CDOW(ctod(“tanggal”))
Contoh : ?CDOW(ctod(“3/20/2006”))  Monday
CMONTH() : menghasilkan nama bulan dalam bahasa inggris
Logic : ?CMONTH(ctod(“tanggal”))
Contoh : ?CMONTH(ctod(“3/20/2006”))  March
DATE() : menghasilkan nilai tanggal sekarang
Logic : ?DATE()
Contoh : ?DATE()  04/09/2013
Operasi Tanggal dan Waktu(2)
DATETIME() : menghasilkan nilai tanggal sekarang
Logic : ?DATETIME()
Contoh : ?DATETIME()  04/09/2013 05:30:21 PM
DAY() : menghasilkan tanggal (1 sd 30)
Logic : ?DAY(“tanggal”)
Contoh : ?DAY(ctod(“3/20/2006”))  20
DMY() : menghasilkan tanggal, bulan ,dan tahun
Logic : ?DMY(ctod(“tanggal”))
Contoh : ?DMY(ctod(“3/20/2006”))  20 March 2006
Operasi Tanggal dan Waktu(3)
MDY() : menghasilkan bulan, tanggal, dan tahun
Logic : ?DMY(ctod(“tanggal”))
Contoh : ?DMY(ctod(“3/20/2006”))  March
20, 2006
TIME() : menghasilkan jam sekarang dengan format
hh:mm:ss
Logic : ?TIME()
Contoh : ?TIME()  05:30:21
Operasi Numeric
ABS : menghasilkan nilai mutlak
Contoh : ?ABS(-3)  3
INT() : menghasilkan bilangan bulat
Contoh : ?INT(1.9)  1
Konversi Tipe dan Ekspresi
ASC() : menghasilkan nilai ASCII dari karakter yang menjadi
argumen
Contoh : ?ASC(“A”)  65
CHR() : menghasilkan sebuah karakter yang nilai ASCII nya
dicantumkan dalam argumen
Contoh: ?CHR(65)  A
CTOD() : menghasilkan data bertipe tanggal berdasarkan
string argumennya
Contoh: ?CTOD(“3/20/2006”)  03/20/2006 Contoh
Konversi Tipe dan Ekspresi (2)
DTOC() : menghasilkan data bertipe string
berdasarkan date argumennya
Contoh: ?DTOC(date())  “03/20/2006”
STR() : menghasilkan nilai string dari numeric
Contoh: ?STR(5)  “5”
VAL() : menghasilkan nilai numeric dari string
Contoh : ?VAL(“5“)  5

Mais conteúdo relacionado

Mais procurados

infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!
infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!
infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!
Infoshare
 

Mais procurados (13)

First step of Performance Tuning
First step of Performance TuningFirst step of Performance Tuning
First step of Performance Tuning
 
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
 
Kill the DBA
Kill the DBAKill the DBA
Kill the DBA
 
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
 
Quadratic Expressions
Quadratic ExpressionsQuadratic Expressions
Quadratic Expressions
 
Tree tricks osdc_melbourne_20101124
Tree tricks osdc_melbourne_20101124Tree tricks osdc_melbourne_20101124
Tree tricks osdc_melbourne_20101124
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
The Ring programming language version 1.3 book - Part 43 of 88
The Ring programming language version 1.3 book - Part 43 of 88The Ring programming language version 1.3 book - Part 43 of 88
The Ring programming language version 1.3 book - Part 43 of 88
 
Sol3
Sol3Sol3
Sol3
 
Solid
SolidSolid
Solid
 
infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!
infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!
infoShare 2014: Gino Marckx, Forget about Agile, let's write great code first!
 
ES2015 - Stepan Parunashvili
ES2015 - Stepan ParunashviliES2015 - Stepan Parunashvili
ES2015 - Stepan Parunashvili
 
Network analysis with Hadoop and Neo4j
Network analysis with Hadoop and Neo4jNetwork analysis with Hadoop and Neo4j
Network analysis with Hadoop and Neo4j
 

Semelhante a Pemrograman Terstruktur 3

AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokus
HamletDRC
 

Semelhante a Pemrograman Terstruktur 3 (20)

The Ring programming language version 1.10 book - Part 31 of 212
The Ring programming language version 1.10 book - Part 31 of 212The Ring programming language version 1.10 book - Part 31 of 212
The Ring programming language version 1.10 book - Part 31 of 212
 
The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
 
MySQL Built-In Functions
MySQL Built-In FunctionsMySQL Built-In Functions
MySQL Built-In Functions
 
The Ring programming language version 1.4.1 book - Part 6 of 31
The Ring programming language version 1.4.1 book - Part 6 of 31The Ring programming language version 1.4.1 book - Part 6 of 31
The Ring programming language version 1.4.1 book - Part 6 of 31
 
Learning to code with Python! (Microsoft Virtual Academy).pptx
Learning to code with Python! (Microsoft Virtual Academy).pptxLearning to code with Python! (Microsoft Virtual Academy).pptx
Learning to code with Python! (Microsoft Virtual Academy).pptx
 
Learning to code with Python! (MVA).pptx
Learning to code with Python! (MVA).pptxLearning to code with Python! (MVA).pptx
Learning to code with Python! (MVA).pptx
 
The Ring programming language version 1.5.4 book - Part 23 of 185
The Ring programming language version 1.5.4 book - Part 23 of 185The Ring programming language version 1.5.4 book - Part 23 of 185
The Ring programming language version 1.5.4 book - Part 23 of 185
 
The Ring programming language version 1.10 book - Part 22 of 212
The Ring programming language version 1.10 book - Part 22 of 212The Ring programming language version 1.10 book - Part 22 of 212
The Ring programming language version 1.10 book - Part 22 of 212
 
[EN] Ada Lovelace Day 2014 - Tampon run
[EN] Ada Lovelace Day 2014  - Tampon run[EN] Ada Lovelace Day 2014  - Tampon run
[EN] Ada Lovelace Day 2014 - Tampon run
 
The Ring programming language version 1.7 book - Part 26 of 196
The Ring programming language version 1.7 book - Part 26 of 196The Ring programming language version 1.7 book - Part 26 of 196
The Ring programming language version 1.7 book - Part 26 of 196
 
The Ring programming language version 1.10 book - Part 34 of 212
The Ring programming language version 1.10 book - Part 34 of 212The Ring programming language version 1.10 book - Part 34 of 212
The Ring programming language version 1.10 book - Part 34 of 212
 
The Ring programming language version 1.5 book - Part 3 of 31
The Ring programming language version 1.5 book - Part 3 of 31The Ring programming language version 1.5 book - Part 3 of 31
The Ring programming language version 1.5 book - Part 3 of 31
 
Java VS Python
Java VS PythonJava VS Python
Java VS Python
 
The Ring programming language version 1.5.2 book - Part 14 of 181
The Ring programming language version 1.5.2 book - Part 14 of 181The Ring programming language version 1.5.2 book - Part 14 of 181
The Ring programming language version 1.5.2 book - Part 14 of 181
 
The Ring programming language version 1.7 book - Part 29 of 196
The Ring programming language version 1.7 book - Part 29 of 196The Ring programming language version 1.7 book - Part 29 of 196
The Ring programming language version 1.7 book - Part 29 of 196
 
Higher Order Procedures (in Ruby)
Higher Order Procedures (in Ruby)Higher Order Procedures (in Ruby)
Higher Order Procedures (in Ruby)
 
The Ring programming language version 1.5.1 book - Part 24 of 180
The Ring programming language version 1.5.1 book - Part 24 of 180The Ring programming language version 1.5.1 book - Part 24 of 180
The Ring programming language version 1.5.1 book - Part 24 of 180
 
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
 
AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokus
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Pemrograman Terstruktur 3

  • 2. MEMORY VARIABLES firstName = “Tom”  create a cchracter memory variable whose symbolic name shall be firstName and assign to the string “Tom” to that variable lastName= “Jerry”  create a cchracter memory variable whose symbolic name shall be lastName and assign to the string “Jerry” to that variable Display memory  display local variables, foxpro system variable, windows definition, menu definition and pop-up windows definition
  • 3. MEMORY VARIABLES (2) ?firstName  dipslay memory variable firstName ?lastName  dipslay memory variable lastName ?”Hello”  display character string-display Hello ?M.firstName  display memory variable firstName ?M.lastName  display memory variable lastName
  • 4. MEMORY VARIABLES (3) noName = firstName  create a carachter memory variable whose symbolic name shall be noName and assign the contents to the contents of variable firstName Key = 5  creates a numeric memory variable whose symbolic name shall be Key and assign 5 to that variable Key = 5.5  creates a numeric memory variable whose symbolic name shall be Key and assign 5.5 to that variable Valid = .T.  create a logical memory varible whose symbolic name shall be Valid and assigns True to that variable Valid = NOT .F. create a logical memory varible whose symbolic name shall be Valid and assigns True to that variable myDay = {12/25/98}  creates a logical memory variable whose symbolic name shall be myDay and assigns 12/25/98 to that variable
  • 5. STRING FUNCTION AND MANIPULATION firstName = “tom” lastName = “jerry” noName = “john doe” The + symbol is used to concatenate (merge/combine) two or more strings ?”Hello” + firstName  display Hello tom ? firstName + lastName  display tomjerry ? firstName +’ ’+ lastName  display tom jerry
  • 6. STRING FUNCTION AND MANIPULATION (2) UPPER FUNCTION ? ‘*‘ + Upper(firstName) + ‘+’  display [TOM] ? ‘*‘ + Upper(“good TimE”) + ‘+’  display [GOOD TIME] totalName = firstName +’ ’+lastName  create a local memory variable whose symbolic name shall be totalName and assigns the contents to tom jerry totalName = Upper(lastName)+’, ’+Upper(firstName )  create a local memory variable whose symbolic name shall be totalName and assigns the contents to JERRY, TOM
  • 7. STRING FUNCTION AND MANIPULATION (3) LOWER FUNCTION firstName = “TOm” lastName = “JERry” noName = “john doe” ? ‘*‘ + Lower(firstName) + ‘+’  display [tom] ? ‘*‘ + Lower(“good TimE”) + ‘+’  display [good time] totalName = firstName +’ ’+lastName  create a local memory variable whose symbolic name shall be totalName and assigns the contents to tom jerry totalName = Upper(lastName)+’, ’+Upper(firstName )  create a local memory variable whose symbolic name shall be totalName and assigns the contents to JERRY, TOM
  • 8. Operasi Tanggal dan Waktu CDOW() : menghasilkan nama hari dalam bahasa inggris Logic : ?CDOW(ctod(“tanggal”)) Contoh : ?CDOW(ctod(“3/20/2006”))  Monday CMONTH() : menghasilkan nama bulan dalam bahasa inggris Logic : ?CMONTH(ctod(“tanggal”)) Contoh : ?CMONTH(ctod(“3/20/2006”))  March DATE() : menghasilkan nilai tanggal sekarang Logic : ?DATE() Contoh : ?DATE()  04/09/2013
  • 9. Operasi Tanggal dan Waktu(2) DATETIME() : menghasilkan nilai tanggal sekarang Logic : ?DATETIME() Contoh : ?DATETIME()  04/09/2013 05:30:21 PM DAY() : menghasilkan tanggal (1 sd 30) Logic : ?DAY(“tanggal”) Contoh : ?DAY(ctod(“3/20/2006”))  20 DMY() : menghasilkan tanggal, bulan ,dan tahun Logic : ?DMY(ctod(“tanggal”)) Contoh : ?DMY(ctod(“3/20/2006”))  20 March 2006
  • 10. Operasi Tanggal dan Waktu(3) MDY() : menghasilkan bulan, tanggal, dan tahun Logic : ?DMY(ctod(“tanggal”)) Contoh : ?DMY(ctod(“3/20/2006”))  March 20, 2006 TIME() : menghasilkan jam sekarang dengan format hh:mm:ss Logic : ?TIME() Contoh : ?TIME()  05:30:21
  • 11. Operasi Numeric ABS : menghasilkan nilai mutlak Contoh : ?ABS(-3)  3 INT() : menghasilkan bilangan bulat Contoh : ?INT(1.9)  1
  • 12. Konversi Tipe dan Ekspresi ASC() : menghasilkan nilai ASCII dari karakter yang menjadi argumen Contoh : ?ASC(“A”)  65 CHR() : menghasilkan sebuah karakter yang nilai ASCII nya dicantumkan dalam argumen Contoh: ?CHR(65)  A CTOD() : menghasilkan data bertipe tanggal berdasarkan string argumennya Contoh: ?CTOD(“3/20/2006”)  03/20/2006 Contoh
  • 13. Konversi Tipe dan Ekspresi (2) DTOC() : menghasilkan data bertipe string berdasarkan date argumennya Contoh: ?DTOC(date())  “03/20/2006” STR() : menghasilkan nilai string dari numeric Contoh: ?STR(5)  “5” VAL() : menghasilkan nilai numeric dari string Contoh : ?VAL(“5“)  5