سلام بر دوستان
Open "test.biN"for Binary As #2
Put#2 , B ' write a byte
Put#2 , W ' write a word
Put#2 , L ' write a long
Ltemp = Loc(#2) + 1 ' get the position of the next byte
Print Ltemp ; " LOC" ' store the location of the file pointer
Print Seek(#2) ; " = LOC+1"
Close #2
'now open the file again and write only the single
Open "test.bin" For Binary As #2
Seek#2 , Ltemp ' set the filepointer
Sn = 1.23 ' change the single value so we can check it better
Put #2 , Sn = 1 'specify the file position
Close #2
در این برنامه seek چه کاری را انجام میدهدPut#2 , B ' write a byte
Put#2 , W ' write a word
Put#2 , L ' write a long
Ltemp = Loc(#2) + 1 ' get the position of the next byte
Print Ltemp ; " LOC" ' store the location of the file pointer
Print Seek(#2) ; " = LOC+1"
Close #2
'now open the file again and write only the single
Open "test.bin" For Binary As #2
Seek#2 , Ltemp ' set the filepointer
Sn = 1.23 ' change the single value so we can check it better
Put #2 , Sn = 1 'specify the file position
Close #2
دیدگاه