You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
88 CHAPTER 4. CODE GENERATION<br />
4.2.3.1 Duplicate Parameters<br />
Due to the parameter handling of Visual Basic / COM it is not possible to use the same variable<br />
more than once in one call. Thus, for input and output parameters different variables have to be<br />
used. Also it is not possible to use the same variable twice for input or output. Examples for<br />
code which is not allowed are:<br />
ÑÒÑ´ÁѸÁѸ¿¸¿µ<br />
Ñ´ÁѸÁѸ¸½¸¼µ<br />
You have to introduce additional variables.<br />
4.2.3.2 Reserved Words<br />
In contrast to C, C++, or <strong>HDevelop</strong>, Visual Basic has many reserved words. Thus, the export<br />
adds the prefix ÀÈ to all variables to avoid collisions with these reserved words.<br />
4.2.3.3 Exception Handling<br />
In <strong>HDevelop</strong>, every exception normally causes the program to stop and report an error message<br />
in a dialog window. This might not be useful in Visual Basic. The standard way to handle this<br />
in Visual Basic is by using the ÇÒ ÖÖÓÖ ÓØÓ command. This allows to access the reason<br />
for the exception and to continue accordingly. Thus, for <strong>HDevelop</strong> programs containing error<br />
handling (Ú ×Ø ÖÖÓÖ ÚÖ) the corresponding code is automatically included.<br />
Please note, that a call of ´Ú µ×Ø ´Ú ÖÖÓÖµ has no influence on the operator<br />
call. The exception will always be raised. This is also true for messages like À ÅËË ÁÄ<br />
which are not handled as exceptions in C++ e.g..<br />
When handling exceptions you also have to be aware that the COM interface always resets the<br />
output parameters at the beginning of the operator execution. Thus, when the exception occures,<br />
output variables are set to ÆÓØÒ. Therefore, you cannot use the values of variables used as<br />
output parameters of the operator causing the exception.<br />
4.2.3.4 Special Comments<br />
<strong>HDevelop</strong> comments containing the symbol as the first character are exported as Visual Basic<br />
statement. Thus the line<br />
ÐÐ Å×ÓÜ´ÈÖ×× ÙØØÓÒ ØÓ ÓÒØÒÙ¸Ú׸ÈÖÓÖÑ ×ØÓÔ¸¸½¼¼¼µ<br />
in <strong>HDevelop</strong> will result in<br />
ÐÐ Å×ÓÜ´ÈÖ×× ÙØØÓÒ ØÓ ÓÒØÒÙ¸Ú׸ÈÖÓÖÑ ×ØÓÔ¸¸½¼¼¼µ<br />
in Visual Basic. This feature can be used to integrate Visual Basic code into an <strong>HDevelop</strong><br />
program.<br />
<strong>HDevelop</strong> / 2000-11-16