📄 xsh_chap02_01.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2004 IEEE and The Open Group, All Rights Reserved --><title>System Interfaces Chapter 2</title></head><body><basefont size="3"> <center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition</font></center><hr size="2" noshade><h3><a name="tag_02_01"> 2.1 </a>Use and Implementation of Functions</h3><p>Each of the following statements shall apply unless explicitly stated otherwise in the detailed descriptions that follow:</p><ol><li><p>If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside theaddress space of the program, or a null pointer), the behavior is undefined.</p></li><li><p>Any function declared in a header may also be implemented as a macro defined in the header, so a function should not be declaredexplicitly if its header is included. Any macro definition of a function can be suppressed locally by enclosing the name of thefunction in parentheses, because the name is then not followed by the left parenthesis that indicates expansion of a macro functionname. For the same syntactic reason, it is permitted to take the address of a function even if it is also defined as a macro. Theuse of the C-language <b>#undef</b> construct to remove any such macro definition shall also ensure that an actual function isreferred to.</p></li><li><p>Any invocation of a function that is implemented as a macro shall expand to code that evaluates each of its arguments exactlyonce, fully protected by parentheses where necessary, so it is generally safe to use arbitrary expressions as arguments. Likewise,those function-like macros described in the following sections may be invoked in an expression anywhere a function with acompatible return type could be called.</p></li><li><p>Provided that a function can be declared without reference to any type defined in a header, it is also permissible to declarethe function explicitly and use it without including its associated header.</p></li><li><p>If a function that accepts a variable number of arguments is not declared (explicitly or by including its associated header),the behavior is undefined.</p></li></ol><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX ® is a registered Trademark of The Open Group.<br>POSIX ® is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -