File: Difference between revisions

From MultiCharts
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Used in Print statements to specify an ASCII file as the output location; must precede the expressions to be printed and be followed by a comma. If the specified file does not exist, the file will be created. 
Used in Print statements to specify an ASCII file as the output location; must precede the expressions to be printed and be followed by a comma.  


==== Usage ====
If the specified file does not exist, the file will be created. 
 
== Usage ==
<syntaxhighlight>File("PathFilename")</syntaxhighlight>  
<syntaxhighlight>File("PathFilename")</syntaxhighlight>  


Where: [[PathFilename]]  - a string expression specifying the path and filename  
Where:  
 
:'''PathFilename''' - a string expression specifying the path and filename.
 
== Notes ==
* Use [[FileDelete]] to delete files.
   
   
==== Example ====
== Example ==
<syntaxhighlight>Print(File("C:\test.txt"),CurrentDate,CurrentTime); will save the output of CurrentDate and  
<syntaxhighlight>Print(File("C:\test.txt"), CurrentDate, CurrentTime);</syntaxhighlight>
CurrentTime to the test.txt file in the root directory of the C: hard drive</syntaxhighlight>
Will save the output of CurrentDate and CurrentTime to the test.txt file in the root directory of the C: drive.
   
   
[[Category:Math and Trig]]
[[Category:Output]]

Latest revision as of 15:02, 19 February 2012

Used in Print statements to specify an ASCII file as the output location; must precede the expressions to be printed and be followed by a comma.

If the specified file does not exist, the file will be created.

Usage

File("PathFilename")

Where:

PathFilename - a string expression specifying the path and filename.

Notes

Example

Print(File("C:\test.txt"), CurrentDate, CurrentTime);

Will save the output of CurrentDate and CurrentTime to the test.txt file in the root directory of the C: drive.