FILE_TO_PASCAL_DATA(1)

NAME
file_to_pascal_data, file_to_pascal_string - convert files to Pascal source code

SYNOPSIS
file_to_pascal_data INPUT_FILE OUTPUT_FILE
file_to_pascal_string INPUT_FILE OUTPUT_FILE

DESCRIPTION
The file_to_pascal_data and file_to_pascal_string programs can be used to convert files to Pascal source code, in order to embed data inside Pascal programs. file_to_pascal_data encodes INPUT_FILE as an Array of Byte, whereas file_to_pascal_string encodes it as a string literal.

EXAMPLES
Consider a file containing only the text "Example" (with a newline character at the end) being used as the input.

After converting the input using file_to_pascal_data, the output file can be used like in the following example:

    const EmbeddedData: {$INCLUDE output_data.inc};

After including the file, this will evaluate to something like:

    const EmbeddedData: array[0..7] of byte = (
        $45, $78, $61, $6D, $70, $6C, $65, $0A
    );

The output generated by file_to_pascal_string can be used in a similar fashion:

    const EmbeddedString = {$INCLUDE output_string.inc};

After including the file, this will evaluate to something like:

    const EmbeddedString = 'Example' + LineEnding;

SEE ALSO
pascal_pre_proc(1), pasdoc(1)