You are on page 1of 3

 Decompostion

 Abstraction
 Pattern recognization
 Stepwise refinement
 Declare,input,output if,case,for,repeat,while
 Structure chart
 Finitinte machine(state transaction diagrm)
 One and 2 dimension array
 Liner searh,bubble sort,
 How to swap column s or rows
 Pre stored function
 String operation
 Rnd function
 Record data type

 User define function and procedure
 Text file
 Slicing of text
 Project development life cycle
 Waterfall model
 Iterative model
 Repaid development
 Ide
 Black and white box testing

Text files

Read Read the dat from file

Write write the dat to the file,any exixting file will be overwritten,and if no file is there the file be
created

Append add the data to the end of the file

REAFDILE <file identifier>,array/variable

WRITEFILE <file identifier>,array/variable

EOF<FILE NAME>

CLOSEFILE <FILE IDENTFIER>

A ARRAY CONTAIN DIFFERENT NUMBER.THE NAME OF THE ARRAY IS MYNUM.WRITE THE POSTIVE
NUMERS IN ARRAY INTO TEXTFILE NUM.COUNT HOW MANY RECORDCS IS WRITTEN IN THE FILE.THE
TOTAL ELEMENT IS 30

DECLARE COUNT :INTEGER

DELCLARE FNAME:STRING
COUNT0

FNAME “NUM.TXT”

OPENFILE FNAME FOR WRITE

FOR X 1 TO 30

IF MYNUM>0 THEN

WRITEFILE FNAME,MYNUM[X]

COUNTCOUNT+1

END IF

NEXT

CLOSEFILE FNAME

FUNCTION logfile(studentid:string) RETURN INTEGER

DECLARE COUNT:INTEGER

DECLARE ID:STRING

DECLARE LFILE:STRING

LFIILE “LOGFILE.TXT”

COUNT0

OPENFILE LFILE FOR APPEND

FOR X1 TO 2000

IDLEFT(LOGARRAY[X],6]

IF ID=STUDENTID THEN

WRITEFILE LFILE,ID

COUNTCOUNT+1

LOGARRAY[X] “ “

END IF

NEXT

CLOSEFILE LFILE

RETURN COUNT

END FUNCTION

You might also like