Difference between revisions of "ChangeTopLineTXTFile"

From scripting
Jump to: navigation, search
(Created page with " global proc ChangeTopLineTXTFile(string $Path, int $NewValue) { //Nick Pisca 0001d, string $Path = "c:\\mayacount.txt"; //ChangeTopLineTXTFile "c:\\mayacount.txt" 3; s...")
 
(No difference)

Latest revision as of 05:10, 22 April 2017

global proc ChangeTopLineTXTFile(string $Path, int $NewValue) {
	//Nick Pisca 0001d, string $Path = "c:\\mayacount.txt";
	//ChangeTopLineTXTFile "c:\\mayacount.txt" 3;
 	string $exampleFileName = ( $Path );
 	string $s;
 	$fileId=`fopen $exampleFileName "w"`;
	string $ConvStr = string($NewValue);
	fwrite $fileId $ConvStr;
 	fclose $fileId;
}



Related Functions: GetTopLineTXTFile

More information on strings and naming, read pages 28-37 in YSYT.