Declare doesn't match with real procedure

Just starting out? Need help? Post your questions and find answers here.
acreis
Enthusiast
Enthusiast
Posts: 222
Joined: Fri Jun 01, 2012 12:20 am

Declare doesn't match with real procedure

Post by acreis »

Good Day,

I don't know where is my error:

Code: Select all

Prototype proto_void()

Declare MyFun(sString$, *ptrFunction.proto_void)

Procedure MyFun(sString$, *ptrFunction.proto_void) ;Declare doesn't match with real procedure
  
  
EndProcedure

User avatar
STARGÅTE
Addict
Addict
Posts: 2245
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Declare doesn't match with real procedure

Post by STARGÅTE »

acreis wrote: Mon Oct 06, 2025 3:22 pm Good Day,

I don't know where is my error:

Code: Select all

Prototype proto_void()

Declare MyFun(sString$, *ptrFunction.proto_void)

Procedure MyFun(sString$, *ptrFunction.proto_void) ;Declare doesn't match with real procedure
  
  
EndProcedure

Do not use a pointer. Prototypes are defined without pointer * character.

Code: Select all

Prototype proto_void(sString$)

Declare MyFun(sString$, ptrFunction.proto_void)

Procedure MyFun(sString$, ptrFunction.proto_void) ;Declare doesn't match with real procedure
  
  ptrFunction(sString$)
  
EndProcedure

Procedure void(sString$)
	Debug sString$
EndProcedure

MyFun("Hello", @void())
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
acreis
Enthusiast
Enthusiast
Posts: 222
Joined: Fri Jun 01, 2012 12:20 am

Re: Declare doesn't match with real procedure

Post by acreis »

Thank you very much!
Post Reply