Jump to content
Sign in to follow this  
Paul H

Inline Variables - Implicit Doubles

Recommended Posts

I am getting some unexpected behaviour when declaring inline floating point variables using implicit typing. Not sure if it is a compiler bug or expected behaviour.

See this (from Delphi 12.2): (if I insert as code the system thinks I am sending spam!!! Does anyone else get this? Anyway, hope it is clear)

 

image.thumb.png.1da903714402e7885ac3bd54cdf2634e.png

I would have expected the implicit type rules of inline variables to create doubles where the assigned type is a double, but this isn't happening.

Share this post


Link to post

foo(GetDouble) is expected error - you cannot pass function result to a procedure with var parameter.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×