Home>Docs>Tutorial

-

pike beginner´s tutorial

The first version of this tutorial, influenced by an old Pike tutorial by Fredrik Hübinette, was completed by Thomas Padron-McCarthy on February 29, 2000. Maintenance since then has been in the hands of the pike development team, and we would hope that you too would want to participate, helping out and contributing updates, pointing out what could be improved upon, and how. Join us!

OBSERVE: Some of the examples are showing their age needs to be updated to the latest Pike version. If you are having problems ask for help on the Pike mailing list or read the reference manual if you feel up to it. The tutorial will be updated ASAP.

Introduction

What is Pike?
What Does Pike Look Like?
Pike and Some Other Languages
Reading this Tutorial
First Steps

Hello World
I Want My Greeting in a Window!
Interactive Pike
Fundamental Concepts

Terminology / Glossary
Your Second Pike Program

The Bare Bones
Running the Program
Command-line Arguments and if
Methods and Loops
Magic Web Stuff
Syntactic Sugar
Showing the Page
Some Notes About WWW
An Introduction to Data Types

What is a data type?
Basic Types
Container Types
Object, Program and Function
Variable Definitions
Basic Types and Reference Types
Methods

An Introduction
Calling a method
More Advanced Examples
Object-Oriented Programming

Object Orientation in General
Object Orientation in Pike
Creating and Using Objects
How to Create a Class
Classes as Record Types
Programs are Classes and Vice Versa
Inheritance
Multiple Inheritance
Access control
Statements

Choosing between Alternatives
Repetition (or "Loops")
Other Statement Types
More About Data Types

The Basic Types
Container Types
The Other Reference Types
Working with Strings

Operators on Strings
Built-in Functions for Strings
Composing Strings with sprintf
Analyzing Strings with sscanf
Wide Strings
Expressions

Some Terminology
Arithmetical Operations
Operations on Complex Types
Comparison
Logical Expressions
Bitwise Operations
Operations on Sets
Indexing
Assignment
Type Conversions
The Comma Operator
Call and Splice
Operator Precedence and Associativity
The Preprocessor

Preprocessor Directives
Modules

Some Examples of Modules
How Do You Use a Module?
How Do You Create a Module?
How Does Pike Find the Modules?
Errors and Error Handling

Error Messages from Pike
Error Handling: the Concept
Detecting an Error
Handling the Error
Error Codes
catch and throw
Not Covered Here