[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------------+##########################################################
#+-| SET ALTERNATE |---------------------------------------------+############
#| +---------------+ The SET ALTERNATE command controls the |############
#| alternate flag or creates an alternate file |############
#+---------------------------------------------------------------+############
##############################################################################
##############################################################################
#+--| Syntax |---------------------------------------+########################
#| SET ALTERNATE < ON || OFF || TO <C-exp> > |########################
#+---------------------------------------------------+########################
##############################################################################
##############################################################################
##########+---| Description |--------------------------------------+##########
##########| SET ALTERNATE controls the alternate flag and allows |##########
##########| specification of the file to be used. |##########
##########| ------------------------------------------------------ |##########
##########| ON |##########
##########| |##########
##########| If ON is specified and the alternate file is open, |##########
##########| then screen I/O is duplicated to the alternate file. |##########
##########| ------------------------------------------------------ |##########
##########| OFF |##########
##########| |##########
##########| If OFF is specified, then screen I/O is not duplicated |##########
##########| to the alternate file. The default alternate flag is |##########
##########| OFF. |##########
##########| ------------------------------------------------------ |##########
##########| TO <C-exp> |##########
##########| |##########
##########| This specifies the alternate file. FORCE creates the |##########
##########| file <C-exp>, so any existing file is truncated to |##########
##########| zero bytes. SET ALTERNATE ON must be set after |##########
##########| SET ALTERNATE TO <C-exp>. |##########
##########+--------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Set alternate to specific file and then |#########
#########| * write to the alternate file. |#########
#########| |#########
#########| SET ALTERNATE TO "c:\tmp\out.txt" |#########
#########| ? "this will not be in the alternate file." |#########
#########| |#########
#########| SET ALTERNATE ON |#########
#########| ? "this will be in the alternate file." |#########
#########| @ 10,10 SAY "This will not be in the alternate file." |#########
#########| |#########
#########| CLOSE ALTERNATE && Turns off and closes the |#########
#########| && alternate file. |#########
#########| |#########
#########| ? "this will not be in the alternate file." |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * The SET ALTERNATE command creates the alternate |#########
#########| * file. Use the exist() function if the alternate |#########
#########| * file should be destroyed. |#########
#########| |#########
#########| PROCEDURE set_alter_on |#########
#########| PARAMETERS CONST CHAR alter_name |#########
#########| IF exist( alter_name ) |#########
#########| ? "File exists. Okay to continue? [Y/N]" |#########
#########| k = get_key() |#########
#########| IF k = 'N' .OR. k = 'n' |#########
#########| RETURN |#########
#########| ENDIF |#########
#########| ENDIF |#########
#########| SET ALTERNATE TO alter_name |#########
#########| SET ALTERNATE ON |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
CLOSE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson