CodeBase - Types and Enums

Return to the CodeBase listing

Category: System Enhancements

Version: 1.0

0
0

Information

Uploaded: 21st Feb 2007 17:13

Modified: 5th Mar 2007 00:15

Author:  Nabil

Summary

A common problem is the missing support for ENUM declaration support

Full Description

Enumeration (ENUM) is a common way to group constants for easier use. <br /> usually like this:<br /> ENUM EType<br /> one = 1<br /> two = 2<br /> three = 3<br /> END ENUM<br /> usually also to make the IDE (editor) to display cetrain constant names that are of the enum-type to choose from. like BOOLEAN can be either 0 or 1 (is usually represented by the keywords FALSE,TRUE in other basic languages), ENUM is only(!) each defined value.<br /> very good for UDTs (the TYPEs) since the programmer explicitly defines all the values that a E-Type can carry. this does not really enable ENUMs, but it clearifies the UTDs.<br /> <br /> This is where the power of #CONSTANT comes in ...<br /> <br /> BE AWARE that the &quot;ENUM EObjects&quot; line must have a line break afterwards<br /> <br /> *********************************************************************************<br /> create a textfile called enumKeywords.ini in folder DBPro, Editor, Keywords<br /> with the following lines<br /> ENUM==ENUM Typename: #CONSTANT name1 val1 ... #CONSTANT nameX valX :ENDENUM<br /> ENDENUM==ENUM ... ENDENUM<br /> <br /> <br /> <br /> <br /> Nabil / BananaAcid

Comments

No comments yet.