Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Palm Programming for the Absolute Beginner
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Palm Programming for the Absolute Beginner

Palm Programming for the Absolute Beginner

Andy Harris

434 pages, parution le 01/10/2001

Résumé

No Experience Required to Learn Palm Programming

If you are new to programming for the Palm and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical Palm programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book, you will be able to apply the basic principles you've learned to the next programming language you tackle!

With the instructions in this book, you'll learn to:
  • Create loops to repeat behavior
  • Use the graphic mode to draw shapes and add a help system
  • Store and retrieve data within a database
  • Use variables and constants to handle information
  • Create two-dimensional arrays

Contents

Introduction

Chapter 1: Writing and Compiling PocketC Programs: The Bad Joke Program
The Waiter Program
Saying Hello to the World

Installing the PocketC Compiler
The Hello World Program
Adding Comments to Your Code
The main() Function
The alert() Function
Ending the main() Function
Compiling Your Program on the PDA
Compiling a Program
Dealing with Errors in the Code
Running Your Program
Writing Programs on the Desktop
Using a Desktop Text Editor
Compiling on the Desktop with PDE
Transferring Compiled Programs to the Palm
Using Palm's Emulator on the Desktop
Back to the Waiter Program
Summary

Chapter 2: Variables, Input, and Output: The Name Game
The Name Game Program
Basic String Variables

The Say Program
Working with Strings
String Concatenation
Outputting Text to the Screen
Output Demo
Thoughts on the alert() Function
Using the puts() Function
Using the Newline Character
Using wait() to Pause the Program
Using Dialogs for Input
Input Demo
Using the sets() Function
Using the getsd() Function
Using the getsi() Function
String Functions
String Mangler Program
Starting Up the Program
Introducing the Integer
Setting Up the Screen
Breaking Up Strings: substr(), strleft(), strright()
Getting a New Page
Extracting from the Middle of a String
Changing Strings: strupr(), striwr()
Getting Information about Strings: strient(), strstr()
Casting an Integer to a String
The Name Game Program
Setting Up the Game
Getting User Input
The String Manipulations
Summary

Chapter 3: Data and Decisions: The Morse Code Program
The Morse Code Translator
Using Numeric Values

The Var Demo Program
Variable Types in PocketC
Casting Variables
Doing Basic Math
The Math Machine Program
Getting Random Numbers from the Computer
The Roll Die Program
Using the If Statement to Make Decisions
The Find Ace Program
Conditions
The Else Clause
The Ace or Not Program
Nesting If Statements
Comparing Multiple Values with Else If
Comparing Multiple Values with Switch
Getting Random Percentages
Making Sound with the Tone Statement
The Mary Program
Storing Code in Functions
The SOS Program
Reading Graffiti Input
Back to the Morse Code Program
Defining Some Functions
Reading a Graffiti Stroke
Generating the Morse Code Signal
Summary

Chapter 4: Repeating Behavior and Larger Programs: The Micro Football Game
Introducing the Micro Football Game
Designing a Program: The STAIR Process

Stating the Problem
Tool Identification
Generating an Algorithm
Implementation
Refining Your Program
Using Loops to Repeat
Using a While Loop to Repeat Behavior
Using a For Loop to Repeat a Given Number of Times
Returning a Value from a Function
Working in Multiple Files
Writing the Football Game
The Variables and Function Prototypes
The Splash Screen
The Play Selection Menu
Managing the Opponent's Behavior
The runPlay Function
Displaying the Score
The main() Function
Summary

Chapter 5: Using the Graphics Mode: The Sketcher
The Sketcher Program
Using the Graphics Mode

The Hello Graphic Program
Graphics Mode
The Graphics Screen
Setting the Form Title
Writing Text with the text() Function
Changing the Text Characteristics with textattr(), textwidth(), and textalign()
Drawing Basic Shapes in Graphics Mode
Drawing Lines Using the line() Function
Drawing Rectangles with the rect() and frame() Functions
Defining Constants
The Def Demo Program
Using Constants in Your Code
Creating Macros with #define
Handling Events
The Event Loop
The Key Checker Program
The Event Demo Program
Variations of the event() Function
Getting Informatiion from the System
Back to the Sketcher
The Event Constants
The drawRect() Function
The Help System
Starting the Event Loop
Handling the Pen Events
Handling the Character Events
Summary

Chapter 6: Creating Bitmap Graphics: The Space Rescue Game
The Space Rescue Game
Bitmap Graphics

The Show Smile Program
Using the Bitmap Studio Program to Generate an Image
Using a Bitmap in a Program
Working with Arrays
The Array Demo Program
Creating Shuttle Graphics
The Ship Demo
Setting Up Some Constants
Initializing the Ship Array
The Main Loop
Adding User Control
The Steer Ship Program
Putting Some of the Code in a Library
Importing the Libraries
Setting Up the Program
The Main Loop
Flying the Ship around the Screen
Setting Up the Fly Program
The Event Loop
The moveShip() Function
The deltaV() Function
Animating the Astronaut
The Spaceman Program
Collision Detection
Looking for a Point in a Rectangle
The pointRec() Function
The main() Function
Looking for Rectangle Overlaps: The Collision Detection Program
The Collision Function
The main() Function of the Collision Detection Program
Putting Together Space Rescue
Setting Up the Space Rescue Game
The main() Function of Space Rescue
The deltaV Function
The moveShip() Function
The setManDir() Function
The moveMan() Function
The checkRendezvous() Function
Summary

Chapter 7: Adding a Graphical User Interface: The Mad Lib Game
The Mad Lib Game
Using Ccontrols

The Basics of Graphical User Interface Design
Installing and Running the Ccontrols System
The Types of Controls Available
Designing a GUI by Hand
The Hi World GUI Program
Responding to GUI Events
Building a More Complex Example
Working with Ceditor
Adding Components
Adding a Label to the Screen
Generating Source Code
Examining the Main Memo Created by Ceditor
Examining the Controls Memo
Managing Events in the Don't Click Program
Back to the Mad Lib Game
Designing an Input Form
Modifying the Code
The makeStory() Function
Examining the Control-Building Code
Modifying the Event Loop
Summary

Chapter 8: Creating a Smart Opponent: The Tic-Tac-Toe Game
The Tic-Tac-Toe Game

Strategy for the Tic-Tac-Toe Game
Creating a Heuristic
Creating input for the Game
The Stripped-Down Game
Drawing the Game Board
The checkHits() Function
Reusing the pointRec Function
The Square Checking Functions
Drawing the X and O Characters
The housekeeping Function
The main() Function
Looking for a Winner with If Statements
The Winning Combination
The Game Board Array
Working with the Winning Combination Array
Adding a Hint Function
Creating the findBest() Function
Comparing the Board with the Winning Combos
Returning the Best Square
Presenting the Best Square
Adding the Computer Opponent
Alternating between Human and Computer
Summary

Chapter 9: Memo Access: The Life Game
Conway's Game of Life

How the PocketC Version Works
Creating a Memo
How Memos Work on the Palm
Disadvantages of Memos
The Make Chart Program
Memo Functions
Reading a Memo
The Surferspeak Program
Writing the Life Game
Global Variables
Reusing the pointRec() Function
Setting Up Buttons
Creating the Board
Showing the Board
Loading a Pattern from a Memo
Saving a Pattern to a Memo
Editing a Pattern
Showing the Neighborhood
Counting a Cell's Neighbors
Calculating the Next Generation
The main() Function of the Life Game
Summary

Chapter 10: Databases and Pointers: The Password Keeper
The Password Keeper Program
Sequential Data Access

The Database Demo Program
Creating a Database
Opening an Existing Database
Writing to a Database
Reading from a Database
Closing the Database
Problems with Sequential Access
Random Access Databases
The Problem with Strings
Fixed-Length Strings
Understanding Pointers
The Pointer Demo Program
Creating Random Access Data
Creating Menus in Ccontrols
Creating Menus and the Menu Bar
Accessing Menu Events
The Password Keeper Program
Global Stuff
Initializing the Database
Creating the Controls
Creating the Menus
Getting a Record from the Database
Storing a Record to the Database
Moving to the Next Record
Moving to the Previous Record
Moving to the First and Last Records
Clearing the Database
Checking for the Database Owner
Searching for a Record
Responding to Menu Action
The main() Function
Summary

Chapter 11: Using the PToolbox Library: The Animator
The Animator

Basic Animator Features
Working with Files and Images
Enhancing Copying and Pasting
Features of PToolboxLib
Working with Colors
The Poly Demo Program
Setting a Color Depth
The Color Draw Program
Displaying a Color Dialog Box
Adding a Flood Fill
Using a Custom Pattern
Working with Screen Buffers
Creating Buffers
Copying Buffers
Copying Rectangles
Storing and Loading Buffers
Creating the Database
Animating the Database
The Buffer DB main() Function
The Animator Program
Global Stuff
Counting the Number Of Records
Initializing the Program
Saving and Loading Images
Moving to Previous and Next Frame
Drawing a Polygon
Viewing the Animation
Copying Part of the Frame
Pasting from the Clipboard
Checking for Menu Input
The Main Event Loop
Looking for Menu Events
Summary

Chapter 12: Designing Data for Programs: The Pocket Battle Game
The Pocket Battle Game

How the Game Works
Design Principles
Data in the Pocket Battle
Unit Data
Unit Class Data
Map Data
Relating the Different Types of Data
Creating Complex Data Types in PocketC
The Pocket Battle Program
Creating the Constants
Making the Global Variables
Creating the Menu
Creating the Direction Buttons
Initializing the Unit Class Data
Buying the Units
Initializing the Unit Data
Initializing the Map Data
Drawing the Map
Printing the Units
Placing the Units
Drawing the Units
Displaying the Online Help
Saving the Map
Loading the Map
Checking the Menus
Setting the dx and dz Variables
Getting a Move Direction from the User
Calculating Combat
Calculating the Move for One Unit
Managing All of the Unit Movement
Starting a New Game
The main() Function
Summary
A Final Word

Index


L'auteur - Andy Harris

Andy Harris earned a degree in Special Education from Indiana University/Purdue University-Indianapolis (IUPUI). He taught young adults with severe disabilities for several years. He also taught himself enough computer programming to support his teaching habit with freelance programming.
Those were the exciting days when computers started to have hard drives, and some computers connected to each other with arcane protocols. He taught programming in those days because it was fun. Eventually, Andy decided to teach computer science full time, and he still teaches at IUPUI. He lectures in the applied computing program and runs the streaming media lab. He also teaches classes in whatever programming language is in demand at the time. He has developed a large number of online video-based courses and international distance education projects.
Andy has written several books on various computing topics and languages including Java, C#, mobile computing, JavaScript, and PHP/MySQL.
Andy welcomes comments and suggestions about his books. He can be reached at aharris@cs.iupui.edu.

Autres livres de Andy Harris

Caractéristiques techniques

  PAPIER
Éditeur(s) Prima Publishing
Auteur(s) Andy Harris
Parution 01/10/2001
Nb. de pages 434
Format 18,7 x 23,2
Couverture Broché
Poids 807g
Intérieur Noir et Blanc
EAN13 9780761535249
ISBN13 978-0-7615-3524-9

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription