SetupDesignGuide.pdf - Firmware Encoding Index
SetupDesignGuide.pdf - Firmware Encoding Index
SetupDesignGuide.pdf - Firmware Encoding Index
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Setup Design Guide<br />
DRAFT<br />
4.2 VFR Programming Keywords<br />
The keywords described in the following section compose the working set of commands for the VFR<br />
language. Each description is followed by an example to better help the programmer understand what a<br />
sample line of VFR code would look like using that particular keyword.<br />
4.2.1 // (comment marker)<br />
Allows a programmer to leave comments in the VFR file and has no effect on the IFR binary that is<br />
generated.<br />
Example: // This is a typical comment marker<br />
4.2.2 #define<br />
Used to assign a meaningful name to a constant. Very similar in function to the ‘C’ style #define<br />
keyword.<br />
Example: #define FORMSET_GUID “CAED85D9-F30C-4ed3-B7A6-83EE32A1C604”<br />
#define GUID FORMSET_GUID<br />
4.2.3 #include<br />
This command tells the VFR compiler to use the contents of a file as part of the source to compile.<br />
Example: #include “C:\Source\SourceFile.ifr”<br />
4.2.4 #strlang<br />
This command is used to assign the ISO-639-2 three letter language abbreviation to its corresponding<br />
printable language name.<br />
This command will be used in an included header file which has a Unicode format. It will be an error<br />
condition which will be detected by the compiler if this is used in a non-Unicode formatted file.<br />
Example: #strlang SPA “Español”;<br />
#strlang FRA “Français”;<br />
#strlang ENG “English”;<br />
#strlang HEB ”עברית“ RIGHT_TO_LEFT;<br />
Notice how the 4 th example shows a RIGHT_TO_LEFT flag is turned on. This information will be<br />
passed on to the attributes for strings that are defined under the HEB (Hebrew) language. Strings that<br />
normally were left-justified in the default situation would now be right justified with this flag turned on.<br />
Additionally, user input will move from right to left. Instead of the column location of the cursor<br />
incrementing as a user types, it will decrement.<br />
4.2.5 #strdef<br />
This command is used to define a string and which language it belongs to.<br />
This command will be used in a separate Unicode header file. It will be an error condition which will<br />
be detected by the compiler if this is used in a non-Unicode formatted file.<br />
Example: #strdef ENG STR_SUBTITLE_TEXT “My subtitle text”<br />
#strdef FRA STR_SUBTITLE_TEXT “Mon texte de sous-titre”<br />
29