Click to See Complete Forum and Search --> : input output


October 27th, 1999, 02:15 PM
Does anyone know how to minipulate files? I need to be able to open a file find a word then do something with that word(delete,replace) after that i want to update the file(text file only) I'm trying not to use a database
please somebody help me!!!!

AScomp
October 28th, 1999, 04:26 AM
Hey,

with

open "file.dat" for input as #1

you can open a file! Then type

input #1, strvar

, and the contentof the file will be copied in a string named strvar. Now you can edit this variable with a lot of functions (f.e. mid$, left$...). Sorry, but how to search to some words I don't know!

Okay, cu!

AScomp

AScomp
October 28th, 1999, 09:51 AM
Hey,

if you want to save the variables, you have to write:

open "file.dat" for output as #1
print #1, strvar
close #1

, and strvar is the variable you want to save (it can be all types of variables). Okay, hope that it helps you!

AScomp