Prev | Current Page 1031 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Often,
then, it might be preferred to compare the data type, and following an unsatisfactory result, exit the
currently running function, while allowing the Neko script to continue its execution, or at the least,
provide the user with a friendly comment.
Most often, the functions you write in your C/C++ libraries will be wrapped by haXe classes you write
yourself. Under such circumstances, it might be safe to assume that any data type checking becomes
redundant, as you will undoubtedly have safeguarded all data transfer to and from the library. However,
it still pays to check the data, and deal with any unforeseen eventualities. You never know when a
library user has taken it upon themselves to forgo your haXe classes in favor of streamlining their
development.
Passing C/C++ Values to Neko
Okay, so you ??™ ve seen how to prepare and pass values to your C/C++ library, but what about returning
values back to the Neko script? If you ??™ ve modified a value sent from the Neko script or you ??™ ve created a
new value in C/C++, you ??™ ll need to package this into a value struct for the return trip.


Pages:
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043