Skip to end of banner
Go to start of banner

printInFile

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Availability

This routine is available starting with katl-commons 1.0.

Syntax

printInFile(filepath, var[, charset])

Description

Prints in the specified file the provided value. It appends the value to the file. For best results, use absolute paths, since relative paths are resolved starting with the current working directory.

Parameters

Parameter name

Type

Required

Description

filepath

string

Yes

Specifies the file name to write in.

var

string

Yes

Specifies the character expression to write into the file filepath.

charsetstringNoSpecifies the charset used to write that file (Available since katl-commons 4.0.0)

Return type

Empty value (The returned value has no meaning.)

Example

printInFile("C:/story.txt", "Once upon a time...");

Prints to the story.txt file the record Once upon a time...

Notes

  1. It is recommended that you use forward slashes ( / ) for file paths. As a general observation, please use the silEnv() routine to create an absolute path.

See also

 

 

  • No labels