AW: passing row()
rudolf at bargholz.ch
Thu Jul 28 15:48:35 UTC 2022
Not all rows are alike. They can be defined in different manners. You can use the row() function or define using $definefromsqlclass(). We often create schemas (that do not inherit table class methods) to define a type of data interface to pass multiple values from one method to another. Using the lRow structure below as an in-between variable is something I would also do, just so that code that uses the row() function and code that uses a row defined from an SQL class look the same and can be debugged the same by looking at the value of the variable. If you put the row creation directly into the "Quit method", you lose the ability to inspect the value of the value you are returning to the caller method. I prefer explicit code, even if it means writing a few more lines of code, to hidden stuff that makes debugging a little more difficult.
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Im Auftrag von Martin Obongita via omnisdev-en
Gesendet: Donnerstag, 28. Juli 2022 13:54
An: omnisdev-en at lists.omnis-dev.com
Cc: Martin Obongita <martin.obongita at yahoo.com>
Betreff: passing row()
I have another issue similar to global variables and best practice.I see programmers store variables in a row before passing them over.
Calculate lRow as row(lVar1,lVar2,lNum1,lNum2)
Quit method lRow
Why not simply pass the variables as a row this way?Quit method row(lVar1,lVar2,LlNum1,lNumb2) I hope I am not jamming the list with unnecessary stuff.
Kind regards,Martin Obongita.
Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en