-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clipper calling convention. ( VO and FP ) #399
Comments
Karl-Heinz, For the compiler this is the same as
There is an implicit conversion from the USUAL type to all of the types that you have specified.
At this moment this returns 0, but I tested this in VO and it should produce a (runtime) error. See https://github.com/X-Sharp/XSharpPublic/blob/main/src/Runtime/XSharp.RT/Types/Usual.prg#L2404 Robert |
Robert,
At first sight i thought VO throws an compile error, but it´s a warning e.g. "converting NIL->STR:51423". And yes at runtime a NIL-> FLOAT throws an DATA TYPE ERROR. The only line that works is: ? ClipTest3() == NULL_ARRAY But do you agree, that X# should throw a warning like VO does ? Karl-Heinz |
Karl-Heinz "should throw" no. The problem is that the code that decides if a conversion from one type to another type is implicitly supported by the language would then also have to take into account if that type is stored in a variable or if that type is defined in a literal. At this moment the code does not do that. Robert |
This code compiles and runs even though the datatype of the return value is declared.
Karl-Heinz
The text was updated successfully, but these errors were encountered: