I have a function with optional boolean parameters. Is there a possibility to create a constant that can be used as named argument in a function call.
Please Login or Register to view this content.
I have a function with optional boolean parameters. Is there a possibility to create a constant that can be used as named argument in a function call.
Please Login or Register to view this content.
Please Login or Register to view this content.
My General Rules if you want my help. Not aimed at any person in particular:
1. Please Make Requests not demands, none of us get paid here.
2. Check back on your post regularly. I will not return to a post after 4 days.
If it is not important to you then it definitely is not important to me.
@mehmetcik
I have tried your solution.
- First I get a compile error, because constappend is not defined as variable and append is not defined
- so I declared constapend, but result ist still, that "CRLF:=True" is passed as String
- then I tried with Const append, but result remains
CRLF:=True will be passed as String and will be assigned to the next optional parameter NewReport instead of recocnized as named parameter CRLF
2019-03-02_03-44-40.jpg
You can't do what you want.
Nearest thing I can think of would be using a ParamArray, passing all the arguments as Strings with the name and value in delimited pattern, then you can loop and split wach argument to determine what is what. Seems like a very strange thing to do though.
Last edited by rorya; 03-02-2019 at 06:49 AM.
Rory
Hello rorya
Thank you for your tip.
I have solved it now with ParamArray. It's not a perfect solution, but it comes closest to that I wanted.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks