what does "!" mean here?

BlitzMax Forums/BlitzMax Beginners Area/what does "!" mean here?

CloseToPerfect(Posted 2016) [#1]
I was looking over digesteroids and I seen these methods using "!". What does the ! mean in this. These were all in the same type and nowhere else is any "!" used


'#Region Method: SetVelocityFromAngle
Method SetVelocityFromAngle(Angle!, Speed!)
Self.VelocityX = Sin(Angle) * Speed
Self.VelocityY = Cos(Angle) * Speed
End Method
'#End Region
'#Region Method: IncreaseVelocityFromAngle
Method IncreaseVelocityFromAngle(Angle!, Speed!)
Self.VelocityX :+ Sin(Angle) * Speed
Self.VelocityY :+ Cos(Angle) * Speed
End Method
'#End Region
'#Region Method: Angle
Method Angle!()
Return TPhysicsUtility.DegreesBetweenPoints(Self.X, Self.Y, Self.X + Self.VelocityX, Self.Y + Self.VelocityY)
End Method
'#End Region


Bobysait(Posted 2016) [#2]
It means "Double" (-> a 64 bits floating point)
It's like # for Float or % for Int etc ...

So, the parameters Angle and Speed are "Double" values


CloseToPerfect(Posted 2016) [#3]
He used :double everywhere else in the code odd that these were the only variances

Thank you


Bobysait(Posted 2016) [#4]
Everybody has it's own code style, so, some use the shortcut symbols (! % # @ $) some other use full litteral type definition (:Int :Byte :Short :Long :...)
Then, what frequently happens is that there are part of the codes you'll find here and there, that are copy/paste from the archives or else, so there are part of the code made by someone, and some other part done by someone else that uses a different style.

Easy as that :)

(And there are also some people that are not very consistant in their syntax, so they mix about everything ... but they are not really the ones to focus on ^_^)


Hardcoal(Posted 2016) [#5]
*Everybody has it's own code style

mine is da best!


John G(Posted 2016) [#6]
I believe "##" can also be used for Double Float.


Juiceter(Posted 2016) [#7]
Better to be consistent though. If I ever mix any code I go through it and rewrite it so it's consistent. But that's just me ;-)


TomToad(Posted 2016) [#8]
I prefer to type out the :Int, :Float, :Double, etc... A little extra typing, but easier to debug something like this
Local Radius% = 3.791
Local Area% = Radius * Pi
Print Area


If you are wondering what the bug is in the example, I used the symbol for Int (%) instead of Float (#). With typing it out, it is easier to spot mistakes like this.