`
` SYMANTEC
`
` Exhibit 1029 Page 1
`
`
`
`C Programming Guide Second Edition.
`Copyright © 1983,1985 by Que Corporation.
`
`First Edition pubiished 1983. Second Edition 1985.
`
`All rights reserved. Printed in the United States of America. No part
`of this book may be used or reproduced in any form or by any
`means, or stored in a data base or retrieval system, without prior
`written permission ofthe publisher except in the case of brief quo-
`tations embodied in critical articles and reviews. Making copies of
`any part ofthis book for any purpose other than your own personal
`use is a violation of United States copyright laws. For information,
`address Que Corporation, 7999 Knue Road, Indianapolis, Indiana
`46250.
`
`Library of Congress Catalog No.: LC 85-60689
`ISBN 0—88022-157-7
`
`Editor
`
`Virginia Noble, M.L.S.
`Editorial Director
`David F. Noble, Ph.D.
`
`Technical Editor
`
`Chris Devoney
`
`_
`
`
`
`SYMANTEC Exhibit 1029 Page 2
` Exhibit 1029 Page 2 SYMANTEC
`
`
`
`
`56
`
`C PROGRAMMING GUIDE, 2nd Edition
`
`Therefore, a function declaration gives us just enough information
`to know what type of data a function returns, whereas a function
`definition tells us how that data type is actually produced. The dif-
`ference between a function declaration and definition is not only a
`fine one, but also an important one.
`
`Declarations give you a glimpse, (No storage is allocated for the
`compiler to examine.) Definitions let you study the whole picture.
`(Storage is allocated.)
`
`Argument List
`An argument list contains the variables that pass to the function
`any information needed to perform the function's task. The argu-
`ment list may contain zero or more arguments. In the examples
`presented thus far, we have seen main() use no arguments,
`uolume(length,
`height, width) use three arguments,
`and
`cube(number) use one argument.
`
`Whether a function needs an argument depends on the purpose of
`the function. A function that requires “outside" help probably
`needs an argument list. If the function is self—contained and needs
`no information other than what the function creates itself, no ar-
`gument list is necessary. (You will learn later in this chapter why no
`list is needed.)
`
`Argument Declarations
`Each variable in the argument list of a function must have an ar-
`gument declaration. If no argument list is provided for a function,
`no argument declaration is needed. Now let's compare the main()
`and cubet) functions in code fragment 3.3.
`
`maint)
`
`versus
`
`cube()
`
`main()
`
`int cube(numberJ
`
`C
`
`3
`
`int number,
`{
`
`3
`
`9.
`Although ma1n() has not needed any arguments thus far, cube()
`needs to know the number that is to be cubed. Because a number
`is "handed" to the cube() function from “outside” itself, cube()
`
`Code fragment 3.3.
`
`int cut
`int nun
`
`int uo
`int 1,|
`
`Code fragment 3.4.
`
`
`
`SYMANTEC Exhibit 1029 Page 3
` Exhibit 1029 Page 3 SYMANTEC
`
`
`
`
`
`
`WRITING YOUR OWN FUNCTIONS
`
`67
`
`needs to know what type of data it has just received. This com-
`munication is the purpose ot the argument declarations.
`
`Any variable in an argument list that is not explicitly declared de-
`faults automatically to an int; such a declaration is known as a de-
`fault argument declaration. To avoid future problems, however,
`you should develop the habit of explicitly declaring a//arguments
`in a function call, even when they are integer variables. You are not
`as likely to forget to declare noninteger data types if you declare
`all variables. Therefore, you should ignore the default and declare
`all function arguments. In the program examples, all arguments are
`declared explicitly, even when they are integers.
`
`A semicolon follows each line of an argument list declaration, as
`shown in code fragment 3.4.
`
`/* right */
`
`/* wrong */
`
`int cube(numberJ
`/* note semicolon */
`
`int number,-
`C
`
`int cubelnumberl
`
`int number
`C
`
`/* semicolon missing */
`
`int uolume(1,h,Lu)
`int
`1, h, w,-
`C
`
`int uo1ume(I, h, Lu)
`int
`1, h,Lu,
`/* not a comma */
`{
`
`Codehagment34
`
`For the cube(J function, a semicolon follows the single argument
`declaration. For uolurnet 1, we have declared I, h, and LU to be in-
`tegers and grouped them into one argument declaration. The last
`argument in the group, w, is followed by a semicolon. Omitting the
`semicolon or substituting a comma is unacceptable and will pro-
`duce an error when the program is compiled.
`
`(If you are familiar with the concept of a stack, you probably already
`know why argument declarations are necessary. These declara-
`tions tell the compiler how many bytes must be popped off the
`stack to “fill in" the variables that are being passed to the function.)
`
`Finally, the argument declarations must occur before the opening
`brace of the function body. If we stretch things a bit, we can view
`
`SYMANTEC Exhibit 1029 Page 4
` SYMANTEC
`Exhibit 1029 Page 4
`
`
`
`This is what the experts have said about the first edition of the C Programming
`Guide.-
`
`"I recommend this boole to anyone interested in learning more about the C
`language. Read it before trying to tackle Kernigban and Ritchie.”
`Jerry Pournelle,
`BYTE Magazine
`
`“I would highly recommend it ( C Programming Guide) to anyone struggling, as I
`am, to become proficient in the C language.”
`
`john R. Johnson,
`C Users’ Group Newsletter
`
`Keep up-to—date on the latest developments in the C programming language with
`this revised edition of the best—selling C Programming Guide.
`
`Experienced programmers will benefit from the expanded discussions that
`explain major changes in the (1 language, particularly those that are expected to
`be part of the X5-J1 1 committee’s findings in its proposed draft for an American
`National Standard for the (Z language.
`
`If you are just beginning to program in C, the C Programming Guide, Second
`Edition, will get you offto a fast start. Eash to read and understand, this bo()k will:
`
`0 Give you clear and concise explanations of everything you need to
`know to begin programming in (Z.
`
`0 Help you understand how and why C works, by comparing sample (3
`programs to equivalent BASIC programs.
`
`0 Show you secrets of experts—tips, tricks, and techniques that take so
`long to discover on your own.
`
`Teach yourselfto program in ( 2. Gain the knowledge and skill you need to venture
`into all areas of programming, from operating systems to accounting packages,
`with this highly respected book.
`
`[J-BBDEE_’-l5?--?
`'1 "_
`2 —.;_.';.~:;_
`rt
`
`' _.‘
`
`SYMANTEC Exhibit 1029 Page 5
` Exhibit 1029 Page 5 SYMANTEC