BCX Console Demonstration Program s154.bas
```
'=======================================================================
'          Semi-OOP implementation for BCX by Kevin Diggins
'=======================================================================

TYPE FOO
MyVar
FUNCTION Squared (MyClass AS FOO_CLASS) AS INTEGER
FUNCTION Cubed   (MyClass AS FOO_CLASS) AS INTEGER
FUNCTION TimesX  (MyClass AS FOO_CLASS, X AS INTEGER) AS INTEGER
END TYPE

DIM IAm AS FOO : Initialize(&IAm, 3)
DIM You AS FOO : Initialize(&You, 4)

CLS

PRINT "================="
PRINT "IAm.Squared " , IAm.Squared(&IAm)
PRINT "IAm.Cubed " , IAm.Cubed(&IAm)
PRINT "IAm.TimesX " , IAm.TimesX(&IAm, 100)
PRINT "================="
PRINT "You.Squared " , You.Squared(&You)
PRINT "You.Cubed " , You.Cubed(&You)
PRINT "You.TimesX " , You.TimesX(&You, 100)
PRINT "================="

PRINT "Changing .MyVar in IAm and You"

IAm.MyVar = 6
You.MyVar = 7

PRINT "================="
PRINT "IAm.Squared " , IAm.Squared(&IAm)
PRINT "IAm.Cubed " , IAm.Cubed(&IAm)
PRINT "IAm.TimesX " , IAm.TimesX(&IAm, 100)
PRINT "================="
PRINT "You.Squared " , You.Squared(&You)
PRINT "You.Cubed " , You.Cubed(&You)
PRINT "You.TimesX " , You.TimesX(&You, 100)
PRINT "================="

SUB Initialize(ME AS FOO_CLASS, b AS INTEGER)
WITH ME
.MyVar = b
.Squared = Squared
.Cubed = Cubed
.TimesX = TimesX
END WITH
END SUB

FUNCTION Squared(ME AS FOO_CLASS)
FUNCTION = ME.MyVar * ME.MyVar
END FUNCTION

FUNCTION Cubed(ME AS FOO_CLASS)
FUNCTION = ME.MyVar * ME.MyVar * ME.MyVar
END FUNCTION

FUNCTION TimesX(ME AS FOO_CLASS, X)
FUNCTION = ME.MyVar * X
END FUNCTION

```

Result:

```
=================
IAm.Squared  9
IAm.Cubed  27
IAm.TimesX  300
=================
You.Squared  16
You.Cubed  64
You.TimesX  400
=================
Changing .MyVar in IAm and You
=================
IAm.Squared  36
IAm.Cubed  216
IAm.TimesX  600
=================
You.Squared  49
You.Cubed  343
You.TimesX  700
=================

```