Translators

Version 2 by jon_haslam
on Nov 27, 2007 07:12.

compared with
Current by jon_haslam
on Nov 27, 2007 07:13.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View page history
{noformat}
In our hypothetical translator, the input expression is of type {{FILE *}} and is assigned the _input-identifier_ {{F}}. The identifier {{F}} can then be used in the translator member expressions as a variable of type {{FILE *}} that is only visible within the body of the translator declaration. To determine the value of the output {{file_fd}} member, the translator performs a cast and dereference similar to the hypothetical implementation of [{{fileno}}(3C)|http://docs.sun.com/doc/819-2243/fileno-3c?a=view] shown above. A similar translation is performed to obtain the value of the EOF indicator.
| Sun provides a set of translators for use with Solaris interfaces that you can invoke from your D programs, and promises to maintain these translators according to the rules for interface stability defined earlier as the implementation of the corresponding interface changes. We'll learn about these translators later in the chapter, after we learn how to invoke translators from D. The translator facility itself is also provided for use by application and library developers who wish to offer their own translators that D programmers can use to observe the state of their software packages.
 
Sun provides a set of translators for use with Solaris interfaces that you can invoke from your D programs, and promises to maintain these translators according to the rules for interface stability defined earlier as the implementation of the corresponding interface changes. We'll learn about these translators later in the chapter, after we learn how to invoke translators from D. The translator facility itself is also provided for use by application and library developers who wish to offer their own translators that D programmers can use to observe the state of their software packages.
[Top|#top]
h2. {anchor:CHP-XLATE-2} Translate Operator

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact