You need to sign in to do that
Don't have an account?
Matt Folger
Explain the syntax of Apex: ! , $, ", {, (, Etc.
Hi, I'm new to the world of developing and trying to learn all the syntax, have read a few books on the topic and browsed around for the info but can't find a quick reference of these very basic questions.
I've gotten by largely by modding existing free GitHub and forum provided code.
But I've still got basic questions regarding what some of these symbols mean and when they are used.
For example: the ! sign.
The $ sign (I think is to call universal components, as I've used it in the $User context).
The " should convey direct text, but I'm not so sure.
The { and the ( are pretty interchangeable to me, but I know that that can't be right. When would you use one over the other?
Any other advice much appreciated.
I've gotten by largely by modding existing free GitHub and forum provided code.
But I've still got basic questions regarding what some of these symbols mean and when they are used.
For example: the ! sign.
The $ sign (I think is to call universal components, as I've used it in the $User context).
The " should convey direct text, but I'm not so sure.
The { and the ( are pretty interchangeable to me, but I know that that can't be right. When would you use one over the other?
Any other advice much appreciated.
Right on for $ is for global variables: https://www.salesforce.com/us/developer/docs/pages/Content/pages_variables_global.htm
For " when you are in visualforce that will dictate the value of a parameter. In apex to dictate text or a string you use single quote.
{ and ! are used in Visualforce for merge fields and calls to variables and action methods.
In Apex { and ( are used like similarly typed program languages to encapsulate functions, methods, etc.
All Answers
Right on for $ is for global variables: https://www.salesforce.com/us/developer/docs/pages/Content/pages_variables_global.htm
For " when you are in visualforce that will dictate the value of a parameter. In apex to dictate text or a string you use single quote.
{ and ! are used in Visualforce for merge fields and calls to variables and action methods.
In Apex { and ( are used like similarly typed program languages to encapsulate functions, methods, etc.