function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
StrangeRoutinesStrangeRoutines 

Valid APEX identifiers?

Is there any documentation anywhere that details what constitutes a valid identifier in APEX? For instance, when trying to compile an apex class, the compiler claims that x__x (two underscores) is an invalid identifier. Oddly, so is x___x (three underscores). As is using the name of a custom object prefixed by anything, like xxxMyObj__c where "MyObj__c" is the custom object.

 

Just curious...

cloudgofercloudgofer

you find reserved words in apex cheat sheets

StrangeRoutinesStrangeRoutines

Thanks for the tip but I did check there. Nothing in there covers the whys and hows of a valid identifier. You know, like every other language has a manual that somewhere says, "Valid identifiers are comprised of the following characters...may be of x length...must not start with...etc.