• Demo requested

    From Finnigann@VERT/BNB to Digital Man / All on Wed Oct 31 07:35:00 2001
    ãIf you can, show some source code with as many of the followingãfunctions as possible.ããTheir use is not entirely clear to me.ããFGET_LENGTHããFSET_LENGTHããSEEK_SETããSEEK_CURããSEEK_ENDããFGET_POS <int_var> <int_var>ã args: handle offsetããFSET_POS <int_var> <int_var or #> [#]ã args: handle offset whenceãããã... Q. What is a row of rabbits walking backwards? A. A receding hare-lineã--- MultiMail/MS-DOS v0.40ã þ Synchronet þ Bits-N-Bytes BBS - One Hellova BBS -- telnet://bnb.dtdns.netã
  • From Amcleod@VERT to Finnigann on Tue Nov 6 12:51:02 2001
    RE: Demo requestedãBY: Finnigann to Digital Man / All on Wed Oct 31 2001 03:35 pmãã > SEEK_SETã > ã > SEEK_CURã > ã > SEEK_ENDããThese aren't functions. hey are just convenient definitions that can be usedãin the "whence" portion of FSET_POS (see below).ãã > FGET_POS <int_var> <int_var>ã > args: handle offsetããThis allows you to find the "current" position in a file and remember it (inãnan INT variable).ãã FGET_POS inh markerããtakes the current position in the file with handle "inh" and store it in INTã"marker". Say you had previously done some reads from the file, and you wereãnow "located" at position 1234 -- your next read will begin at byte 1234. THenã"marker" will now contain the number 1234.ãã > FSET_POS <int_var> <int_var or #> [#]ã > args: handle offset whenceããYou can use this to return to a previously marked spot in the file. Supposeãyou didãã FSET_POS inh marker SEEK_SETãã you will re-position the file "pointer" back to byte 1234 so you can readãthat data again (for whatever reason). You can use ANY number in the offsetãposition, not only things that you FGET_POS'd. Suppose you want to go toãrecord 15 in a file of records each 45 bytes long. You can compute the offsetãwith simple math and FSET_POS to that record. ããThe "whence" argument allows you to seek from the beginning of the data-setã(SEEK_SET), from the current position (SEEK_CUR) or from the end of theãdata-set (SEEK_END) so to go to 40 bytes before the end of the file you canããã FSET_POS inh 40 SEEK_ENDããand you're there. Marking and returning to the same spot is very useful whenãyou are locking data so as to allow multi-user access without conflict. Youãare about to read a record, so when you are at the point of reading you FLOCKãthe data, and FGET_POS the position. Then you read the data as much as youãlike, and when you are done you FSET_POS back to the position and then FUNLOCKãthe data.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã