Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: note - Function Up: misc - Module Previous: stopwatch.delete - Function


edit - Function



Package utility
Module misc


Edit and optionally execute a file


Synopsis
edit(file, execute, editor)

include "edit.g"



Synopsis
edit(file, execute=T, editor='')(file, execute, editor)



Description
Edit 'file'. If 'editor' is set, use it, otherwise use the editor specified by the 'EDITOR' environment variable if set, otherwise use 'vi'. If 'execute' is T, execute (i.e. include), the file.



Arguments

file   File to edit
    Allowed: string
execute   Read the file into glish?
    Allowed: T or F
    Default: T
editor   Editor to use, if unset use EDITOR
    Allowed: string
    Default: ''


Returns
T if OK, fail or F on failure



Example
ok := edit('myfile.g');
ok := edit('myfile.g', execute=F);    # Edit, but don't execute
ok := edit('myfile.g', editor='vi');  # Edit with vi





next up previous contents index
Next: note - Function Up: misc - Module Previous: stopwatch.delete - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15