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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NAMESYNOPSISsm_occur_no - get the occurrence number of data in the current fieldint sm_occur_no ();DESCRIPTIONReturns the occurrence number of the data item in the current field. If thecurrent field is scrollable, the occurrence number is the item ID, that is, theitem's index in the whole scroll. If the field is an element of a non-scrollablearray, the occurrence number is the field's element number. Otherwise, theoccurrence number is 1.RETURNS0 if the cursor is not in a field; 1 if the cursor is in a field that isneither scrollable nor an array element; The element number if thecursor is in a non-scrollable array; The item id if the cursor is in ascrollable field or array.VARIANTS AND RELATED FUNCTIONSEXAMPLEsm_getcurno ();#include "smdefs.h"/* Find the number of the scrolling item under the cursor,* and scroll down to the next higher multiple of 5. */int thisn;thisn = sm_occur_no ();sm_rscroll (sm_getcurno (), 5 - (thisn % 5));

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

Saved successfully!

Ooh no, something went wrong!