Forum

× General Forum discussions that don't fit in any of the other specific forum categories, help etc.

Question Anonymous method or reference to procedure/function

  • Md. Shariful Alam Khan
  • Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
More
1 week 5 days ago #11797 by Md. Shariful Alam Khan
Anonymous method or reference to procedure/function was created by Md. Shariful Alam Khan
Is Anonymous method available in CT?

I have a delphi unit which I need to convert to CT. Delphi unit has following declaration:

TDatabaseConnectionString = reference to procedure(AResult: Boolean;
ADatabase, ALibname, AServer, APort, AUserName, APassowrd: String;
AConType: Integer);

How can I do same with CT?

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 week 5 days ago - 1 week 5 days ago #11799 by Sternas Stefanos
Replied by Sternas Stefanos on topic Anonymous method or reference to procedure/function
Sir
<<Is Anonymous method available in CT?>>

NO

Delphi is an "Old fashion" Windows Pascal IDE,

My suggestion is to rewrite your project with CodeTyphon Object Pascal

CodeTyphon Architect and Programmer
Last edit: 1 week 5 days ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

  • Md. Shariful Alam Khan
  • Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
More
1 week 5 days ago #11803 by Md. Shariful Alam Khan
Replied by Md. Shariful Alam Khan on topic Anonymous method or reference to procedure/function
I am not using CT for windows development, I am using it for Linux development. Is there any option to have a type same like below in CT:
TDatabaseConnectionString = reference to procedure(AResult: Boolean;
ADatabase, ALibname, AServer, APort, AUserName, APassowrd: String;
AConType: Integer);

Please Log in or Create an account to join the conversation.

More
1 week 4 days ago #11804 by Matis A.
Try
TDatabaseConnectionString = procedure(AResult: Boolean; ADatabase, ALibname, AServer, APort, AUserName, APassowrd: String;
                                      AConType: Integer);

CodeTyphon Core Programmer

Please Log in or Create an account to join the conversation.