The DATAdesign engine allows you to use defaults for bufferids, indexids and fieldids. There is however no guarantee that any default is actually valid.
You can always set or get the bufferid of the default buffer. Reading is done like this (but you don't know if that buffer still exists) :
Sbasic id= bufferID Assembler IDBF return long bufferid C long DDbufferid(long *result); errors, code, meaning noneOr you can set it like this :
Sbasic DEFbuffer id id : long Assembler DEFB long bufferid C long DDdefbuffer(long bufferid); errors, code, meaning itnf -7 invalid bufferid ijob -2 this buffer is owned by another job
Every buffer can have a default field. You have to keep track of this, as you can't find out what the default field is at a given moment.
Sbasic DEFfield #bufferid, field Assembler DEFF bufferid short field C long DDdeffield(long bufferid, short field); errors, code, meaning itnf -7 invalid bufferid
Every buffer also has a default index for it. Reading is done like this :
Sbasic id= indexID (#bufferid) Assembler IDIN bufferid return long indexid C long DDindexid(long bufferid, long *result); errors, code, meaning itnf -7 invalid bufferidOr you can set it like this :
Sbasic DEFindex #bufferid, id id : long Assembler DEFI bufferid long indexid C long DDdefindex(long bufferid, long indexid); errors, code, meaning itnf -7 invalid bufferid or indexidPROGS, Professional & Graphical Software