c# - What are JScript case sensitivity rules? -


I am using ScriptControlClass for reference and I thought the JScript case was sensitive ... However, my The user base has surprised me ... I have several ways which I have provided users all over the top such as: IF, Empty, AGE, PARSE, etc ...

OK , Today a user has filed a fault that the Isammam Group was not working. I checked the user and informed that the function was ISSAMPGROUP and it was working properly ... the user answered, all the functions except the IF work in a lesser case. I therefore ran a quick test and all 5 Worked in an insensitive way in the work ... I was surprised to see age and age as well as all other changes and to work correctly. How below are my functions declared and I have verified that the JSScript function is calling my C # every time ...

 this.scriptEngine.AddCode (@ "Function Edge (Birthday) { Return cmd.Age (birthday);}; "); This.scriptEngine.AddCode (@ "function ISSAMPGROUP (value) {return cmd.IsSampleGroup (value);};"); 

For some reason why I do some work in an insensitive manner and others do not get me confused. For example, AG case is insensitive, yet ISSAMPGROUP is case-sensitive.

The answer to this one is quite simple - Javascript is case sensitive, but Browser creators can decide to implement their JavaScript engine in such a way that it is possible to forgive more.

Anything that works with a case-sensitive and inaccurate case should still be fixed because the seller-to-seller script engine may vary and it can not work in all browsers Just the most forgiving browser

You have highlighted the names of things, especially for all the caps, how best they are.

Can work and not be down for naming other opponents, that is, your javascript has a similar designated object. MyVariable and myVariable and MYVARIABLE


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -