Page 1 of 1

Using Create

Posted: Mon Jul 02, 2007 9:25 pm
by asawyer13
I am trying to use the CreateFile code that's in the help file,
but I get an error at line 1, syntax error.
also one on line 3, WriteString incorrect number of parameters.
I cut and pasted the code, so I'm a little confused.
Thanks,
Alan


Code: Select all

 
If CreateFile(0, "Text.txt")         ; we create a new text file...
    For a=1 To 10
      WriteStringN(0, "Line "+Str(a))  ; we write 10 lines (each with 'end of line' character)
    Next
    For a=1 To 10
      WriteString(0, "String"+Str(a))  ; and now we add 10 more strings on the same line (because there is no 'end of line' character)
    Next
    CloseFile(0)                       ; close the previously opened file and store the written data this way
  Else
    MessageRequester("Information","Can't create the file!")
  EndIf

Posted: Mon Jul 02, 2007 9:28 pm
by asawyer13
I didn't realize that the errors don't clear when I do a compile.
I think I'm okay. Sorry for the confusion.

Posted: Mon Jul 02, 2007 10:01 pm
by Rescator
You can change that behaviour in the IDE preferences! (cleaning the error log for each compile)