1 / 13

PEMROGRAMAN TERSUTRKTUR

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

nerita
Download Presentation

PEMROGRAMAN TERSUTRKTUR

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. PEMROGRAMAN TERSUTRKTUR By: SitiMariyah

  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 lastNameand 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 carachtermemory variable whose symbolic name shall be noNameand 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 totalNameand 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 totalNameand 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. OperasiTanggaldanWaktu CDOW() : menghasilkannamaharidalambahasainggris Logic : ?CDOW(ctod(“tanggal”)) Contoh : ?CDOW(ctod(“3/20/2006”))  Monday CMONTH() : menghasilkannamabulandalambahasainggris Logic : ?CMONTH(ctod(“tanggal”)) Contoh : ?CMONTH(ctod(“3/20/2006”))  March DATE() : menghasilkannilaitanggalsekarang Logic : ?DATE() Contoh : ?DATE()  04/09/2013

  9. OperasiTanggaldanWaktu(2) DATETIME() : menghasilkannilaitanggalsekarang Logic : ?DATETIME() Contoh : ?DATETIME()  04/09/2013 05:30:21 PM DAY() : menghasilkantanggal (1 sd 30) Logic : ?DAY(“tanggal”) Contoh : ?DAY(ctod(“3/20/2006”))  20 DMY() : menghasilkantanggal,bulan,dantahun Logic : ?DMY(ctod(“tanggal”)) Contoh : ?DMY(ctod(“3/20/2006”))  20 March 2006

  10. OperasiTanggaldanWaktu(3) MDY() : menghasilkanbulan, tanggal,dantahun Logic : ?DMY(ctod(“tanggal”)) Contoh : ?DMY(ctod(“3/20/2006”))  March 20, 2006 TIME() : menghasilkan jam sekarangdengan format hh:mm:ss Logic : ?TIME() Contoh : ?TIME()  05:30:21

  11. Operasi Numeric ABS : menghasilkannilaimutlak Contoh : ?ABS(-3)  3 INT() : menghasilkanbilanganbulat Contoh : ?INT(1.9)  1

  12. KonversiTipedanEkspresi ASC() : menghasilkannilai ASCII darikarakter yang menjadiargumen Contoh : ?ASC(“A”)  65 CHR() : menghasilkansebuahkarakter yang nilai ASCII nyadicantumkandalamargumen Contoh: ?CHR(65)  A CTOD() : menghasilkan data bertipetanggalberdasarkan string argumennya Contoh: ?CTOD(“3/20/2006”)  03/20/2006Contoh

  13. KonversiTipedanEkspresi (2) DTOC() : menghasilkan data bertipe string berdasarkan date argumennya Contoh: ?DTOC(date())  “03/20/2006” STR() : menghasilkannilai string dari numeric Contoh: ?STR(5)  “5” VAL() : menghasilkannilai numeric dari string Contoh : ?VAL(“5“)  5

More Related