1FILE_TO_PASCAL_DATA(1)           User commands          FILE_TO_PASCAL_DATA(1)
2
3
4

NAME

6       file_to_pascal_data,  file_to_pascal_string  -  convert files to Pascal
7       source code
8

SYNOPSIS

10       file_to_pascal_data INPUT_FILE OUTPUT_FILE
11
12       file_to_pascal_string INPUT_FILE OUTPUT_FILE
13

DESCRIPTION

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

EXAMPLES

23       Consider  a  file  containing  only  the text "Example" (with a newline
24       character at the end) being used as the input.
25
26       After converting the input using file_to_pascal_data, the  output  file
27       can be used like in the following example:
28
29           const EmbeddedData: {$INCLUDE output_data.inc};
30
31       After including the file, this will evaluate to something like:
32
33           const EmbeddedData: array[0..7] of byte = (
34               $45, $78, $61, $6D, $70, $6C, $65, $0A
35           );
36
37       The  output generated by file_to_pascal_string can be used in a similar
38       fashion:
39
40           const EmbeddedString = {$INCLUDE output_string.inc};
41
42       After including the file, this will evaluate to something like:
43
44           const EmbeddedString = 'Example' + LineEnding;
45

SEE ALSO

47       pascal_pre_proc(1), pasdoc(1)
48
49
50
51                                  2021-09-22            FILE_TO_PASCAL_DATA(1)
Impressum