RE: Updated FileIO enhancement proposal

From: Tom Fitzpatrick (tfitz@cadence.com)
Date: Mon Oct 26 1998 - 06:27:10 PST


BAD MSG:
Hi All,
-Lines: 38
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1536
X-Status: $$$$
X-UID: 0000000678
Status: RO

On further review, I and my R&D experts have a small but significant
problem with the $swrite proposal. We don't believe it's a good idea to
have different rules for $swrite and $fwrite. For other system tasks, like
$display, the *entire* meaning of whether an argument is a format or not
depends on it being a string literal, not on it's position.

$display( "%d format string", var, "%d another format string", var);

is perfectly valid. It will make it confusing and error prone to have one
system task, $swrite, have different rules. If I want to change this
$display to a $fwrite, then all I have to do is change the name and add the
filename:

$fwrite("file.out","%d format string", var, "%d another format string", var);

If I instead want to change this to a $swrite, then I've got to rewrite the
entire task

$swrite(stringvar,"%d format string %d another format string", var, var);

instead of just changing the name and filename:

$swrite(stringvar,"%d format string", var, "%d another format string", var);

We're also not entirely sold on the notion that users will actually use a
string variable to specify a format string. Can you give an example of
where this functionality would be used?

Thanks,
-Tom

---------------
Tom Fitzpatrick

Senior Technical Marketing Manager Cadence Design Systems, Inc.
Cycle Simulation Products 270 Billerica Rd.
Logic Design and Verification Business Unit Chelmsford, MA 01824
x6438 (978)446-6438



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:53:00 PDT and
sponsored by Boyd Technology, Inc.