Welcome!
This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!
Logical return type functions
We're using some functions to validate write conditions of some fields which are supposed to return a logical value (true/false).
When generating different types (Backoffice C++ and ASP.NET MVC) the return types are different across the languages, and none of them is generated as bool return type.
C++:
C#:
Is there a way to actually create functions with a true/false return type?
Since Genio creates logical fields in the database as an Integer (int), the return to the application is made as an int. Manual code and conditions in Genio should be uniformed as == 0/1 or != 0/1.
The C++ allows return as true/false because the compiler manages the implicit cast from boolean to a long, while in C# the cast needs to be explicit between boolean and int.
Keep Informed
About the Community
Question tools
Stats
Asked: 10/04/20, 01:44 |
Seen: 1555 times |
Last updated: 24/08/20, 14:18 |