Results 1 to 10 of 40

Thread: File handling

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    I'm not sure whether I understand, but that way writing events

    Code:
    f = openFile(filename + ".txt", "write");
    fprintln(f,self.name);
    fprintln(f,self.score);
    fprintln(f,self.etc);
    closefile(f);
    and that reading them

    Code:
    f = openFile(filename + ".txt", "read");
    freadln(f);
    self.name = int(fgetarg(f,0));
    self.score = int(fgetarg(f,1));
    self.etc =  int(fgetarg(f,2));
    closefile(f);

  2. The Following 4 Users Say Thank You to Jeplaa For This Useful Post:

    EvoloZz (9th February 2013),kung foo man (9th February 2013),pollo (10th February 2013),XLxp|HUNT3R|HD (22nd February 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •