-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
xbasepp.scroll
114 lines (92 loc) · 2.26 KB
/
xbasepp.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import ../code/conceptPage.scroll
id xbasepp
name XBase++
appeared 1997
tags pl
centralPackageRepositoryCount 0
leachim6 XBase++
filepath x/XBase++.prg
fileExtensions prg
example
func Main()
Qout("Hello World")
return 1
lineCommentToken //
printToken Qout
stringToken "
hasLineComments true
// A comment
hasComments true
// A comment
hasPrintDebugging true
hasSemanticIndentation false
hasStrings true
"Hello world"
wikipedia https://en.wikipedia.org/wiki/XBase%2B%2B
example
#include "class.ch"
//
// This program prints:
//
// Missy Meow!
// Mr. Bojangles Meow!
// Lassie Bark!
// Press any key to continue...
//
/////////////////////////////
//
PROCEDURE Main()
//
/////////////////////////////
LOCAL aAnimals := Array(3)
LOCAL i
aAnimals[1] := Cat():New("Missy")
aAnimals[2] := Cat():New("Mr. Bojangles")
aAnimals[3] := Dog():New("Lassie")
FOR i:=1 TO LEN(aAnimals)
? aAnimals[i]:Name + " " + aAnimals[i]:Talk()
NEXT i
WAIT
RETURN
/////////////////////////////
//
CLASS Animal
//
/////////////////////////////
EXPORTED:
VAR Name READONLY
METHOD Init
DEFERRED CLASS METHOD Talk
ENDCLASS
METHOD Animal:Init( cName )
::Name := cName
RETURN Self
/////////////////////////////
//
CLASS Dog FROM Animal
//
/////////////////////////////
EXPORTED:
METHOD Talk
ENDCLASS
METHOD Dog:Talk()
RETURN "Bark!"
/////////////////////////////
//
CLASS Cat FROM Animal
//
/////////////////////////////
EXPORTED:
METHOD Talk
ENDCLASS
METHOD Cat:Talk()
RETURN "Meow!"
related xbase clipper visual-foxpro visual-objects
summary Xbase++ is an object oriented programming language which has multiple inheritance and polymorphism. It is based on the XBase language dialect and conventions. It is 100% Clipper compatible language supporting multiple inheritance, polymorphism, object oriented programming. It supports the xBase data types, including Codeblocks. With Xbase++ it is possible to generate applications for Windows NT, 95, 98, Me, 2000, XP, VISTA and Windows 7.
created 2005
backlinksCount 31
pageId 2924800
revisionCount 65
dailyPageViews 19
appeared 2000
isbndb 0