ebook img

Going from BASIC to C PDF

178 Pages·13.434 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Going from BASIC to C

C Going from BASIC to Robert J. Traister £& ZL^JtSf^ G GOIN F VI E IC ROBERT TRAISTER J. Prentice-Hall, Inc., Englewood Cliffs, NewJersey 07632 CONTENTS PREFACE vii ACKNOWLEDGMENTS ix INTRODUCTION xi CHAPTER 1 C PROGRAMMING LANGUAGE / CHAPTER 2 THE LATTICE C-COMPILER 9 CHAPTER 3 CONSOLE INPUT/OUTPUTCONVERSIONS 16 CHAPTER4 C LANGUAGE STATEMENTS 42 CHAPTER 5 STRING MANIPULATION IN C 69 CHAPTER 6 C LANGUAGE FUNCTIONS 82 CHAPTER 7 C PROGRAM FORMATAND MISTAKES 700 Contents CHAPTER 8 CHARACTERS, CONVERSION, AND CONFUSION, 777 CHAPTER 9 MIMICKING BASIC STATEMENTS AND FUNCTIONS IN C 124 CHAPTER 10 C LANGUAGE FILEKEEPING 143 SUMMATION 760 INDEX 161 - PREFACE This book is written especially for the BASIC language programmer who is contemplating or presently making the switch to C language. The reasons forlearningtoprograminCaremany.Theseincludetheincreasedflexibility of the language, the speed of execution, and the fact thatChasbeencalled the best possible language available today for microcomputers. Without a doubt, it isveryadvantageoustoknowhowtoprograminC.Theportability of this language from machine to machine means that once you know how to program in C, you can bring most of your programs up on nearly any microcomputerforwhichaCcompilerisavailable. BASICprogrammersseemtohavethemostdifficultyinmakingthetran- sition to C. There are manyreasonsforthis,butpossiblythemostprevalent oneisthelackofprintedinformationdesignedespeciallytohelpBASICpro- grammersmakethetransition.Inthepast,Chasbeenthetoolofthesystem level programmer and software designer.Inotherwords,Chasbeenmoreor lessrestrictedtotheworldoftheprofessionalprogrammer.Ontheotherhand, BASIC enjoyspopularityinnearlyeveryfieldofcomputerprogramming. If you know how to program in BASIC and are capable of usingmost or all of the statements and functions available in this language, moving up to C should not present tremendous difficulty, provided you have theright instruction. The C language "Bible" is The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie. These authors were intimately involved in the development of C. However, even the advanced BASICpro- grammer will probably have a great deal of difficulty sifting through the information presented in their book.Thereasonforthisisthattheaudience for which this book was written was devoid of BASIC programmers. The book was never meant to be a tutorial, but rather a reference manual toC. However, once you are introduced to Cthroughapropertutorial,thisbook becomesaninvaluableaid. Goingfrom BASIC to C isanintroductorytutorialandreferenceguide specifically for BASIC programmers who are making the transition from BASIC to C. This book contains a large number of BASIC programs and their C language program equivalents. Hopefully, this book will serve as a reference guide to programmers who are more accustomed to thinking in BASIC thaninC.ByseeingspecificBASICprogramsandtheircloseorexact C language counterparts included in these pages, the reader should gain a quicker and better grasp ofC becausethelatteristaughtintheenvironment of BASIC, a conventional reference point for all BASIC programmers. It is the hope of the author that this text willmakeyourtransitionfromBASIC toCapleasantlearningexperience. RobertJ. Traister ACKNOWLEDGEMENT The author would like to acknowledge and thank Lifeboat Associates, Inc. for supplying theLatticeC-Compiler(Version2.0)tobeusedasamodelfor this book. Additionally, this company providedtechnicalassistanceatevery stepoftheway.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.