Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
Name Lookup Problem |
Tue, Mar 20 2018 2:47 AM | Permanent Link |
Michael Dreher | I am getting a compiler error "function xyz does not exist", but I don't
know what's wrong with the code(complete project attached, using 2.06B11). type TFloatFunc1 = function(f : double) : double; TVector = class public function Equals(const v : TVector) : boolean; function Map(f : TFloatFunc1) : TVector; end; function DoubleTheValue(f : double) : double; begin Result := f*f; end; procedure RunTest; var b : boolean; begin b := TVector.Create.Map(DoubleTheValue).Equals(TVector.Create); // [Error] Main.wbs (42,27): The referenced variable, parameter, or function DoubleTheValue does not exist end; Michael Dreher Attachments: CodeExample.zip |
Tue, Mar 20 2018 6:25 AM | Permanent Link |
Matthew Jones | What happens if you assign the function to a variable and pass that in?
-- Matthew Jones |
Tue, Mar 20 2018 6:35 AM | Permanent Link |
Michael Dreher | "Matthew Jones" wrote:
// What happens if you assign the function to a variable and pass that in? It compiles. Here are workarounds: procedure RunTest_WorkAround; var b : boolean; f : TFloatFunc1; begin f := DoubleTheValue; b := TVector.Create.Map(f).Equals(TVector.Create); end; procedure RunTest_WorkAround2; var v : TVector; b : boolean; begin v := TVector.Create.Map(DoubleTheValue); b := v.Equals(TVector.Create); end; Michael Dreher |
Tue, Mar 20 2018 5:24 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I am getting a compiler error "function xyz does not exist", but I don't know what's wrong with the code(complete project attached, using 2.06B11). >> It's a bug - I'll make sure this is fixed in the upcoming 3.0 release. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, September 13, 2024 at 03:42 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |