C5-LR.PDF
(
3498 KB
)
Pobierz
CLARION 5
Language
Reference
2
CLARION 5
™
L
ANGUAGE
R
EFERENCE
COPYRIGHT 1985, 1986, 1988, 1990, 1992, 1994, 1995, 1996, 1997, 1998 by TopSpeed
Corporation. All rights reserved.
This publication is protected by copyright and all rights are reserved by TopSpeed Corporation.
It may not, in whole or part, be copied, photocopied, reproduced, translated, or reduced to any
electronic medium or machine-readable form without prior consent, in writing, from TopSpeed
Corporation.
This publication supports Clarion 5. It is possible that it may contain technical or typographical
errors. TopSpeed Corporation provides this publication “as is,” without warranty of any kind,
either expressed or implied.
TopSpeed Corporation
150 East Sample Road
Pompano Beach, Florida 33064
(954) 785-4555
Trademark Acknowledgements:
TopSpeed
®
is a registered trademark of TopSpeed Corporation.
Clarion 4
™
is a trademark of TopSpeed Corporation.
Btrieve
®
is a registered trademark of Pervasive Software.
Microsoft
®
Windows
®
and Visual Basic
®
are registered trademarks of Microsoft Corporation.
All other products and company names are trademarks of their respective owners.
Printed in the United States of America (0998)
T
ABLE
OF
C
ONTENTS
3
T
ABLE OF
C
ONTENTS
FOREWORD - O
RIGINS OF THE
C
LARION
L
ANGUAGE
1 - I
NTRODUCTION
23
41
The Language Reference Manual
41
Chapter Organization ............................................................................................ 41
Documentation Conventions and Symbols ........................................................... 43
Reference Item Format ......................................................................................... 43
Clarion Conventions
45
Standard Date ....................................................................................................... 45
Standard Time ....................................................................................................... 45
Clarion Keycodes.................................................................................................. 46
2 - P
ROGRAM
S
OURCE
C
ODE
F
ORMAT
47
Statement Format
47
Declaration and Statement Labels ........................................................................ 47
Structure Termination ........................................................................................... 48
Field Qualification ................................................................................................ 48
Reserved Words .................................................................................................... 50
Special Characters ................................................................................................ 51
Program Format
52
PROGRAM (declare a program) .......................................................................... 52
MEMBER (identify member source file) ............................................................. 54
MAP (declare PROCEDURE prototypes) ............................................................ 56
MODULE (specify MEMBER source file) .......................................................... 57
PROCEDURE (define a procedure) ..................................................................... 58
CODE (begin executable statements) ................................................................... 61
DATA (begin routine local data section) .............................................................. 61
ROUTINE (declare local subroutine) ................................................................... 62
END (terminate a structure) ................................................................................. 64
Statement Execution Sequence ............................................................................. 65
PROCEDURE Calls ............................................................................................. 66
PROCEDURE Prototypes
67
Prototype Syntax .................................................................................................. 67
Prototype Parameter Lists..................................................................................... 70
PROCEDURE Return Types ................................................................................ 78
4
CLARION 5
™
L
ANGUAGE
R
EFERENCE
Prototype Attributes
80
C, PASCAL (parameter passing conventions) ...................................................... 80
DLL (set procedure defined externally in .DLL) ................................................. 81
NAME (set prototype’s external name) ................................................................ 81
PRIVATE (set procedure private to a CLASS or module) ................................... 82
PROC (set function called as procedure without warnings)................................. 83
PROTECTED (set procedure private to a CLASS or derived CLASS) ............... 84
RAW (pass address only) ..................................................................................... 85
REPLACE (set replacement constructor or destructor) ....................................... 86
TYPE (specify PROCEDURE type definition) .................................................... 87
VIRTUAL (set virtual method) ............................................................................ 88
Procedure Overloading
89
Rules for Procedure Overloading ......................................................................... 89
Name Mangling and C++ Compatability ............................................................. 91
Compiler Directives
92
ASSERT (set assumption for debugging) ............................................................. 92
BEGIN (define code structure) ............................................................................. 93
COMPILE (specify source to compile) ................................................................ 94
INCLUDE (compile code in another file) ............................................................ 95
EQUATE (assign label) ........................................................................................ 96
ITEMIZE (enumeration data structure) ................................................................ 97
OMIT (specify source not to be compiled) .......................................................... 98
SECTION (specify source code section).............................................................. 99
SIZE (memory size in bytes) .............................................................................. 100
3 - V
ARIABLE
D
ECLARATIONS
101
Simple Data Types
101
BYTE (one-byte unsigned integer) .................................................................... 101
SHORT (two-byte signed integer) ...................................................................... 102
USHORT (two-byte unsigned integer) ............................................................... 103
LONG (four-byte signed integer) ....................................................................... 104
ULONG (four-byte unsigned integer) ................................................................ 105
SIGNED (16/32-bit signed integer).................................................................... 106
UNSIGNED (16/32-bit unsigned integer) .......................................................... 107
SREAL (four-byte signed floating point) ........................................................... 108
REAL (eight-byte signed floating point)............................................................ 109
BFLOAT4 (four-byte signed floating point) ...................................................... 110
BFLOAT8 (eight-byte signed floating point) ..................................................... 111
T
ABLE
OF
C
ONTENTS
5
DECIMAL (signed packed decimal) .................................................................. 112
PDECIMAL (signed packed decimal)................................................................ 114
STRING (fixed-length string) ............................................................................ 116
CSTRING (fixed-length null terminated string) ................................................ 118
PSTRING (embedded length-byte string) .......................................................... 120
Implicit String Arrays and String Slicing ........................................................... 122
DATE (four-byte date) ........................................................................................ 123
TIME (four-byte time) ........................................................................................ 124
Special Data Types
125
ANY (any simple data type) ............................................................................... 125
LIKE (inherited data type) ................................................................................. 127
Implicit Variables ................................................................................................ 129
Reference Variables ............................................................................................ 130
Data Declarations and Memory Allocation
134
Global, Local, Static, and Dynamic.................................................................... 134
Data Declaration Sections .................................................................................. 134
NEW (allocate heap memory) ............................................................................ 136
DISPOSE (de-allocate heap memory) ................................................................ 137
Picture Tokens
138
Numeric and Currency Pictures .......................................................................... 138
Scientific Notation Pictures ................................................................................ 140
String Pictures .................................................................................................... 140
Date Pictures ....................................................................................................... 141
Time Pictures ...................................................................................................... 143
Pattern Pictures ................................................................................................... 144
Key-in Template Pictures ................................................................................... 145
4 - E
NTITY
D
ECLARATIONS
147
Complex Data Structures
147
GROUP (compound data structure) ................................................................... 147
CLASS (object declaration) ............................................................................... 150
File Structures
159
FILE (declare a data file structure) ..................................................................... 159
INDEX (declare static file access index) ............................................................ 162
KEY (declare dynamic file access index) .......................................................... 163
MEMO (declare a text field) .............................................................................. 165
BLOB (declare a variable-length field) .............................................................. 166
RECORD (declare record structure) .................................................................. 168
Plik z chomika:
Kot_Maciek
Inne pliki z tego folderu:
c5-ah.pdf
(4237 KB)
C5-ET.PDF
(2236 KB)
c5-gs.pdf
(564 KB)
C5-LR.PDF
(3498 KB)
c5-lc.pdf
(3242 KB)
Inne foldery tego chomika:
ADOBE
THRDPTY
Zgłoś jeśli
naruszono regulamin