November 27, 2020, 04:47:13 PM

Author Topic: death to case sensitivity !  (Read 7116 times)

Offline col

  • Sr. Member
  • ****
  • Posts: 465
Re: death to case sensitivity !
« Reply #60 on: June 07, 2018, 04:18:20 PM »
Quote
interesting to note that it is 'illegal' in c++ to do it (which is what monkey2 compiles into).
As it's 'trans-piled' into c++ you can prepend anything you want for the c++ code. It would be probably end up as something like bb_varname in c++ when the coder used _varname in the monkey code.
To be is to be perceived.

https://github.com/davecamp

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2001
Re: death to case sensitivity !
« Reply #61 on: June 08, 2018, 06:34:58 AM »
Just had a quick look into the transpiled sources...
Code: [Select]
mx2 code
field _gameTrigger:int = 400

transpiled code
bbInt m__0gameTrigger=400;

Offline col

  • Sr. Member
  • ****
  • Posts: 465
Re: death to case sensitivity !
« Reply #62 on: June 08, 2018, 08:19:08 PM »
Interesting that it contains a double underscore.
I can understand not starting variable names with underscore(s) as there is a general rule that they are reserved for the compiler chain, but 'containing' underscores... I'm not sure why that's a rule in c++. Meh... in the meantime... on with some coding :)
To be is to be perceived.

https://github.com/davecamp

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal