Category talk:Plain English-output: Difference between revisions

From Rosetta Code
Content added Content deleted
(Add source code)
 
(→‎Source code: Fixed file output in code)
 
Line 26: Line 26:
If the output directory is not in the file system, create the output directory in the file system.
If the output directory is not in the file system, create the output directory in the file system.
If the output path is not in the file system, create the output path in the file system.
If the output path is not in the file system, create the output path in the file system.
Put the string then the return byte into a buffer.
Read the output path into a buffer.
Append the string then the return byte to the buffer.
Write the buffer to the output path.
Write the buffer to the output path.


Line 32: Line 33:
If the output directory is not in the file system, create the output directory in the file system.
If the output directory is not in the file system, create the output directory in the file system.
If the output path is not in the file system, create the output path in the file system.
If the output path is not in the file system, create the output path in the file system.
Put the string into a buffer.
Read the output path into a buffer.
Append the string to the buffer.
Write the buffer to the output path.
Write the buffer to the output path.



Latest revision as of 13:18, 12 January 2023

Source code

\ Change these paths if you prefer to change them.
\ It is your responsibility to clean up the output.txt file.
The output directory is a directory equal to "C:\output\".
The output path is a path equal to "C:\output\output.txt".

To write a number to the output:
Privatize the number.
Convert the number to a string.
Write the string to the console.
Write the string to the output path.

To write a number to the output without advancing:
Privatize the number.
Convert the number to a string.
Write the string to the console without advancing.
Write the string to the output path without advancing.

To write a string to the output:
Write the string to the console.
Write the string to the output path.

To write a string to the output path:
If the output directory is not in the file system, create the output directory in the file system.
If the output path is not in the file system, create the output path in the file system.
Read the output path into a buffer.
Append the string then the return byte to the buffer.
Write the buffer to the output path.

To write a string to the output path without advancing:
If the output directory is not in the file system, create the output directory in the file system.
If the output path is not in the file system, create the output path in the file system.
Read the output path into a buffer.
Append the string to the buffer.
Write the buffer to the output path.

To write a string to the output without advancing:
Write the string to the console without advancing.
Write the string to the output path without advancing.