06.11.2013 Views

The Basis System - Weapons and Complex Integration - Lawrence ...

The Basis System - Weapons and Complex Integration - Lawrence ...

The Basis System - Weapons and Complex Integration - Lawrence ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CONTENTS<br />

1 <strong>The</strong> <strong>Basis</strong> <strong>System</strong> 1<br />

1.1 Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

1.2 <strong>Basis</strong> Is Both a Program <strong>and</strong> a Development <strong>System</strong> . . . . . . . . . . . . . . . . 1<br />

1.3 About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />

I Running a <strong>Basis</strong> Program, A Tutorial 5<br />

2 Getting Started 7<br />

2.1 What is <strong>Basis</strong>? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />

2.2 Starting the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />

2.3 Getting Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

2.4 Comparison of <strong>Basis</strong> <strong>and</strong> Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />

3 <strong>The</strong> <strong>Basis</strong> Language 11<br />

3.1 Assignments <strong>and</strong> Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

3.2 Input from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

3.3 Some Differences from Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

3.4 Declaring Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />

3.5 Some Elements of Array Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />

3.6 IF Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

3.7 Looping Constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br />

3.8 Vector Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

3.9 Differences between <strong>Basis</strong> <strong>and</strong> Fortran . . . . . . . . . . . . . . . . . . . . . . . 18<br />

4 Graphics 21<br />

5 Text Input <strong>and</strong> Output 23<br />

5.1 Stream Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

5.2 Stream Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

6 Functions 27<br />

6.1 Defining Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br />

i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!