Next:
Contents
Contents
Index
Physics 2101 - Scientific Computing
Randy Kobes
Physics Department
September, 2003
University of Winnipeg
Contents
A Perl Program
Programming Elements
Variables
Scalar Variables
Double Quoting
Single Quoting
HERE syntax
Arrays
Hashes
Random values
Declaring variables
Local and global variables
Loops
Simple for () {}
Use of $_
Variable scoping
General for ( ) { }
while () {}
Conditionals
Comparisons
Numerical comparison
String comparison
Sorting
Regular Expressions
if() { } and unless(){ }
Variable scoping
if/else and ternary operators
if/elsif/else and switch statemements
Multiple conditions
Defined and existence
Input/Output
Standard Input/Output/Error
Command line arguments
File Handles
References and Complex Data Structures
References
Complex data structures
Subroutines, functions, and modules
Defining subroutines
Variable scoping
Passing in variables
Variable scoping
Returning variables
Passing in and returning arrays and hashes
References to subroutines
Modules
CGI scripts
HTTP protocol
HTML
Common markup tags
Form tags
Form processing
Web servers
CGI scripts
Objects Oriented Programming
A simple example
Further examples
Inheritance
A C Program
Programming Elements
Variables
Scalar Variables
Arrays
Loops
Simple for () {}
while () {}
Conditionals
if() { }
if/else and ternary operators
Input/Output
Standard Input/Output/Error
Command line arguments
File Handles
Subroutines, functions, and libraries
Defining subroutines
Header files
Libraries
Makefiles
Pointers
What is a pointer?
Pointers and subroutines
Arrays
Allocation
Subroutine return types
Function pointers
Void pointers
Structures
Defining structures
Pointers to structures
Structures and subroutines
C++
A C++ program
Classes
Constructors
Inheritance
Java
A simple program
Classes
Constructors
Inheritance
Index
About this document ...