Your full service technology partner! 
Patrik [Unspecified] -Collapse +Expand
-Collapse +Expand
-Collapse +Expand Profile◄╣
Member Info
Member Narration

MB Posts (1)

Search Patrik:

Personal Account . . .
-- USA

Real Name:  Patrik [Unspecified]
Primary Role:  Coder
Joined: Mar 2002 (19 years ago)
Visits: 4
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Message Boards Activity

1 posts.

Thread 1 of 1
Thread Starter or a Reply (but not last)  Group

"StrToDouble" - someone please?
OK, here's my problem:, , I have this function, function TForm1.Romberg1Integrand(x: Double): Double;, , In Delphisourcecode this function shall looks this:, , function TForm1.Romberg1Integrand(x: Double): Double;, begin, [b]Romberg1Integrand := x*x;[/b], end;, , My problem is, that I want to define the Romber1Integrand in runtime: The user may select a function (in this case it is "x*x") from a ComboBox and the string shall be used as the function. Any idea on how to do this, it's really important!, , Any help is apreciated, thanks in advance.
Posted to MB Topic: Delphi News / Other « Delphi Board
19 years ago

"separate pascal function for each one, and then use type fType = function(d:double):double to form an array of pointers to them so that you can index them from the selected variable of the combo box.", , Most conveniently using the Items.Objects of the TComboBox to store the pointers to the individual functions ..., , CB1.Items.AddObject('x * x', TObject(@XSq));, , Result := fType(CB1.Items.Objects[CB1.ItemIndex])(X);
19 years ago
Nothing New Since Your Last Visit

Pascal and Delphi Coding
Sales Website: Or visit our legacy sales site:

©1995-2021 Prestwood IT Solutions.   [Security & Privacy]