APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Tips & Techniques :
Can the STREAM READ look for the presence of the \r character as a record delimeter?
Or is it limited to looking for the \r\n combination?
It depends on the platform. On Unix/Linux hosts, fgets() looks for \n to terminate each line. On Windows hosts, fgets() looks for \r\n. That follows the standard on each platform.
When you set the line terminator in Appx, that doesn't affect fgets(), it just tells Appx which characters you want stripped from the end of the string. If you set the line terminator to NONE, Appx just calls fgets() and gives you whatever fgets() returns. If you set the line terminator to LF or CR\LF, Appx will strip those characters from the end of the string (if present).
We've never really made a link between STREAM READ and the format of an Appx print file (in other words, we don't produce print files using the --- STREAM functions). STREAM READ will simply treat the form-feed character as just another character. If you want to treat a form-feed as a line delimiter, you can always search for a form-feed in the buffer (a simple IF statement will find any form-feeds and TEXT AT POSITION will tell you where it appears).
Or, you can use any other C runtime function (or OS-provided function) to read any file that you like. STREAM READ is just a convenient wrapper around the fgets() C runtime function.
[Append to This Answer]
2006-Feb-08 8:41am
Previous: (Answer) What is the proper usage of --- STREAM READ LENGTH field?
Next: (Answer) The --- COMPARE file contains the fields that are different after an IF DIFF is executed. If a field has multiple occurances, how can I tell which occurance changed?
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=622
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.