Summary:
This page discusses topics concerning Genero BDL source code editing. You are free to use your preferred source code editor to write your programs.
Before starting to edit source files, you must identify and set the locale (character set) you want to use in your sources.
Genero BDL supports single-byte and multi-byte character sets. When developing multi-lingual applications, we recommend that you write .per and .4gl source files in ASCII, and externalize language-dependent messages in string resource files.
For more details, see Localization.
When editing .per form files, pay attention to the LAYOUT/SCREEN section, and try to avoid TAB characters in the curly-brace delimited grid areas. Different kinds of text or source code editors can expand TABs differently, according to the configuration settings (like 4 or 8 blanks). As a result, if two programmers are using different TAB expansion settings, the form layout will display in different ways.
If used in a grid area, a TAB character will be interpreted as 8 blanks by fglform. It is legal to use TABs in the rest of the .per file or .4gl sources (for example, to indent the code).
If you are using the vim editor, Genero BDL provides automatic code completion and syntax highlighting with fglcomp and fglform compilers.
In order to use Genero BDL auto completion with vim, you need at least vim version 7 with the Omni Completion feature.
To get the benefit of this feature with the vim editor, do the following:
autocmd Filetype fgl setlocal omnifunc=fglcomplete#Complete
autocmd Filetype per setlocal omnifunc=fglcomplete#Complete
syntax on
au BufNewFile,BufRead *.per setlocal filetype=per
Once these steps are done (make sure that you have set a Genero BDL environment), you can use automatic code completion; open a .4gl or .per file, start to edit the file, and when you are in vim insert mode, press Control-X followed by Control-O to get a list of language elements to complete the BDL instruction syntax or expression.
For more details about vim, see http://www.vim.org.