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_dlength - get the length of a field's contentsint sm_dlength (field_number)int field_number;DESCRIPTIONReturns the length of data stored in field_number. The length does not includeleading blanks in right justified fields, or trailing blanks in left-justifiedfields (which are also ignored by sm_getfield). It does include data that havebeen shifted offscreen.RETURNSLength of field contents, or -1 if the field is not found.VARIANTS AND RELATED FUNCTIONSEXAMPLEsm_e_dlength (field_name, element);sm_i_dlength (field_name, occurrence);sm_n_dlength (field_name);sm_o_dlength (field_number, occurrence);sm_length (field_number);/* Save the contents of the "rank" field in a buffer* of the proper size. */char *save_rank;if ((save_rank = malloc (sm_n_dlength ("rank") + 1)) == 0)punt ("Malloc error");sm_n_getfield (save_rank, "rank");

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

Saved successfully!

Ooh no, something went wrong!