google-code-export / la-pe

Automatically exported from code.google.com/p/la-pe
0 stars 0 forks source link

Unexpected behaviour in untyped parametres? #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What will reproduce the problem?

procedure Foo(var G);
begin
  Writeln(G);  // Produces error.
  Writeln(VarType(G));  // Produces same error.
  if(G = 10) then  
    Writeln('Blegh');
end;

What is the expected output? What do you see instead?
Expected output:
 * The value of the variable.
 * The type of the variable, as described in https://code.google.com/p/la-pe/source/browse/lpeval_import_variant.inc

Actual output:
"Exception in Script: Cannot invoke identifier"

Which version are you using?

Most recent (Simba build #493, http://l0.lt/builders/master/builds/493 )

Please provide any additional information below.

See post - http://villavu.com/forum/showthread.php?t=68613&p=1265797#post1265797

Original issue reported on code.google.com by mayazche...@gmail.com on 19 Sep 2013 at 7:23

GoogleCodeExporter commented 9 years ago
This is not a bug. This is intended, untyped parameters have *no* type info at 
all.

Original comment by Dgby...@gmail.com on 4 Oct 2013 at 9:45

GoogleCodeExporter commented 9 years ago
Yes, this is as designed. See 
http://docwiki.embarcadero.com/RADStudio/XE5/en/Parameters_%28Delphi%29#Untyped_
Parameters

Original comment by niels....@gmail.com on 12 Aug 2014 at 12:42