Hi Geoffrey,
In that respect there is no difference between $fgets which is supported in the analog context (9.5.4.1) and $fgetc. They only differ in the amount of characters they collect. In both cases the states should be completely controllable during iteration. When an iteration is not accepted, all variables and file positions should be reset to the value they had at the last accepted time-point. That can be done for both a single character read ($fgetc) or multiple characters read ($fgets).
Cheers,
Marq
-----Original Message-----
From: Geoffrey.Coram [mailto:geoffrey.coram@analog.com]
Sent: Wednesday, March 23, 2011 2:14 PM
To: Marq Kole
Subject: Re: issues in LRM sections 9.5.3, 9.5.4, and 9.5.5
Might there be a problem with $fgetc and $ungetc when the analog block
is called for multiple iterations at a timepoint?
Marq Kole wrote:
> Hi All,
>
>
>
> Upon reading the contents of the sections 9.5.3, 9.5.4, and 9.5.5 in the
> 2.3.1 LRM I've found a few items where I think we can improve:
>
>
>
> 9.5.3: In the second paragraph, just below the syntax box twice the
> phrase "family of tasks" is used. To me this implies that there are more
> system tasks like $swrite, but they are not mentioned here. A reference
> is made to the $fwrite family of tasks but in the section 9.5.2 they are
> not mentioned - $fwrite appears in company of $fdisplay, $fstrobe,
> $smonitor, and $fdebug. Instead, the $fwrite family of tasks refers to
> the $fwrite, $fwriteb, $fwriteh, and $fwriteo tasks. To prevent
> confusion the phrase "family of tasks" should be replaced by "task" and
> the sentence should be adjusted to match the singular form.
>
>
>
> 9.5.4: In subsection 9.5.4.2 at the bottom of page 206, a descriptor is
> mentioned with the character c. In the list at the top of the next page
> (207), this character is not mentioned at all. This is a significant
> omission as it is not clear whether the receiving variable for such a
> descriptor should be a string variable, an integer variable or any of
> the two.
>
>
>
> 9.5.5: Twice a reference is made to $ungetc while this system task is
> not mentioned anywhere else in the LRM except in the overview table 9-2
> on page 194. I would also like to know why there is a restriction for
> using the $fgetc function and $ungetc task from the analog context. This
> seems rather arbitrary to me, and limits the ability to read textual
> data from file for detailed processing. I would suggest to support
> $ungetc and $fgetc in the analog context as well. Otherwise, a reference
> to $ungetc in the 1364-2005 or 1800-2009 standard might be relevant.
>
>
>
> Cheers,
>
> Marq
>
>
>
>
>
> *Marq Kole*
>
> Product Manager AMSRF Simulation
>
> NXP Semiconductors / Central R&D / Foundation Technology
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Mar 23 06:20:54 2011
This archive was generated by hypermail 2.1.8 : Wed Mar 23 2011 - 06:20:56 PDT