Ticket #28 (closed todo: fixed)

Opened 6 years ago

Last modified 5 years ago

Update 40_file_ops.pir

Reported by: whiteknight Owned by:
Priority: trivial Milestone:
Component: docs Version:
Severity: low Keywords:
Cc: Language:
Patch status: Platform:

Description

This file, from examples/tutorial/, needs to be reviewed and possibly updated after all the IO changes recently. If the file is still accurate, some description needs to be added. Otherwise, the file needs to be redone completely (and make sure to update any changes in the t/examples/tutorial.t test file as well).

Change History

Changed 6 years ago by coke

  • type changed from bug to todo

Changed 6 years ago by jkeenan

Here's the file's code in its entirety:

.sub main :main
    .local pmc fileout, filein

    fileout = open '40_file_ops_data.txt', 'w'
    print fileout, "The quick brown fox jumps over the lazy dog.\n"
    close fileout

    filein = open '40_file_ops_data.txt', 'r'
    $S0 = readline filein
    say $S0
    close filein

    # Be nice and remove the temporary file we created.
    $P1 = new 'OS'
    $P1.'rm'('40_file_ops_data.txt')
.end

Where in the source code would we find the current IO functionality that would govern this example?

Thank you very much.
kid51

Changed 5 years ago by allison

  • status changed from new to closed
  • resolution set to fixed

File reviewed, all is accurate and up-to-date with current I/O functionality. The I/O refactor didn't really change the PIR interface aside from read modes, which have been updated in the example file.

Note: See TracTickets for help on using tickets.