extended type problem: Y (currency) assumes I (integer)

60 views
Skip to first unread message

Hurricane

unread,
Aug 6, 2025, 12:17:30 AMAug 6
to harbou...@googlegroups.com, harbou...@googlegroups.com
Hi
When creating tables with fields of type Y, it will assume I (integer)

// extended type problem: Y (currency) assumes I (integer)
function main
   CLS
   MakeDBF()

   USE EDS
   ? FIELDTYPE('MONEY84'), FIELDLEN('MONEY84'), FIELDDEC('MONEY84')
   ? FIELDTYPE('MONEY30'), FIELDLEN('MONEY30'), FIELDDEC('MONEY30') // without RTE, another problem will occur 
   ? ' '
   ASCAN( DBSTRUCT(), {|a| iF( a[1] == 'MONEY84', QOUT(a[2], a[3], a[4]), ) } )
   return nil

function MakeDBF()
   LOCAL aStr[0]

   IF ! FILE('EDS.DBF')
      AADD( aStr, { 'MONEY84', 'Y', 8, 4 } )
      AADD( aStr, { 'MONEY30', 'Y', 3, 0 } ) // RTE?
      DBCREATE( 'EDS', aStr )
   ENDIF

   RETURN NIL

Regards,
Hurricane
Reply all
Reply to author
Forward
0 new messages