uniFPrintfUL()
Writes to a file similar to uniFPrintf() except changes to the current Windows user language before converting.
Synopsis
int uniFPrintfUL(file file, string format, [,<type1> var1
[,<type2> var2 ...]] );
Parameters
Parameter | Description |
---|---|
file | file to be written, use the constants stdin, stdout, stderr (see Reference tables) |
format | Output format |
var1, var2, ... | Arguments |
Return value
In the event of errors, the function returns -1 or EOF otherwise, the number of written characters.
Errors
If incorrect data types are used or if a file is not open.
Description
Writes to a file similar to uniFPrintf() but uses the current Windows user language before converting (Start->Settings-> Countries) to be able to use, for example, semicolons as in other Windows programs such as Excel. For the format, see chapter uniFPrintf().
Example
The following example writes five letters into a text file.
const int STRING_COUNT = 2;
main()
{
int i,j;
file f, f1;
dyn_string russianValue;
russianValue =makeDynString("Российские слова", "Кодекс
примера");
DebugN("Russian letters:", russianValue);
f=fopen("C:/TEMP/tfile7.TXT","w+");
//writes string values to the text file
for (i=1;i<= STRING_COUNT;i++) uniFPrintfUL(f,"%.5s\n",
russianValue [i]); //Cut the string to a length of 5 letters
fclose(f);
}
Assignment
String functions
Availability
CTRL