Floating point numbers

There is a native integer type in MPS. Is there also a Double or a Float type? I couldn't find one.

Thanks in advance!

Regards
mschalk
4 comments
I guess you mean types for properties in language structure definition - yes, there are types derived from string and constraining the values by a regex:
  • _FPNumber_String for doubles
  • _FloatNumberValue for floats

Cheers,

Vaclav
0
Thanks for your reply Vaclav!
I added the jetbrains.mps.lang.structure + jetbrains.mps.baseLanguage to my own language.
However I can't define the mentioned Types from above for my property in structure definition.
0
It could be because your structure model misses a dependency on j.m.baselanguage.structure. You may try Control/Cmd + R and type _FPNumber_String - this could set the dependencies for you.

Vaclav
0
Thank you for your help, Vaclav!
Finally it's working!
0

Please sign in to leave a comment.