12.07.2015 Views

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NAMESYNOPSISsm_ioccur - insert blank occurrencesint sm_o_ioccur (field_number, occurrence, count)int field_number;int occurrence;int count;DESCRIPTIONInserts count blank data items before the specified occurrence, moving thatoccurrence and all following occurrences down. If inserting that many would movesome occurrence past the end of its array or scrolling array, fewer will beinserted. This function never increases the maximum number of items a scroll cancontain; sm_sc_max does that. If count is negative, occurrences will be deletedinstead, subject to limitations described in the page for sm_doccur.If occurrence is zero, the occurrence used is that of field_number. Ifoccurrence is nonzero, however, it is taken relative to the first field of thearray in which field_number occurs.This function is normally bound to the INSERT LINE key. It has only twovariants, sm_i_ioccur and sm_o_ioccur; the other three, including sm_ioccuritself, do not exist.RETURNS-1 if the field or occurrence number is out of range; -3 if insufficientmemory is available; otherwise, the number of occurrences actuallyinserted (zero or more).VARIANTS AND RELATED FUNCTIONSEXAMPLEsm_i_ioccur(field_name, occurrence, count);sm_i_doccur(field_name, occurrence, count);sm_o_doccur(field_number, occurrence, count);#include "smkeys.h"/* As a shortcut, make the PF5 key insert five blank* lines in the "amounts" array. */int field, key;while ((key = sm_openkeybd ()) != EXIT){if (key == PF5){/* Make sure we're in the right place */field = sm_base_fldno (sm_getcurno ());if (field == sm_n_fldno ("amounts"))sm_o_ioccur (field, 0, 5);}...}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!