> Le 2 juin 2017 à 20:56, Chip Scheide via 4D_Tech <[email protected]> a 
> écrit :
> 
> [...]
> Table and Field numbers
> Table and Field pointers

Just a suggestion, a "combo" makes possible to code fields in a single longint 
in place of pointers or pair of numbers table+field. Nice to put a field 
reference in json, for example.  

• decimal offset
  $combo_l:=($tableNumber*100000)+$fieldNumber
...
  $tableNumber:=$combo_l\100000
  $fieldNumber:=$combo_l%100000

• bit offset
  $combo_l:=($tableNumber << 16) + $fieldNumber
...
  $tableNumber:=$combo_l >> 16
  $fieldNumber:=$combo_l & 0xFFFF

For my own I prefer the 1st, easier to read… and I don't feel concerned by max 
for table and field number - 32767  ;-)

-- 
Arnaud de Montard 



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to