Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Metaprogramming/Ring/metaprogramming-1.ring
Normal file
5
Task/Metaprogramming/Ring/metaprogramming-1.ring
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
o1 = new point { x=10 y=20 z=30 }
|
||||
addmethod(o1,"print", func { see x + nl + y + nl + z + nl } )
|
||||
o1.print()
|
||||
Class point
|
||||
x y z
|
||||
44
Task/Metaprogramming/Ring/metaprogramming-2.ring
Normal file
44
Task/Metaprogramming/Ring/metaprogramming-2.ring
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
New App
|
||||
{
|
||||
I want window
|
||||
The window title = "hello world"
|
||||
}
|
||||
|
||||
Class App
|
||||
|
||||
func geti
|
||||
if nIwantwindow = 0
|
||||
nIwantwindow++
|
||||
ok
|
||||
|
||||
func getwant
|
||||
if nIwantwindow = 1
|
||||
nIwantwindow++
|
||||
ok
|
||||
|
||||
func getwindow
|
||||
if nIwantwindow = 2
|
||||
nIwantwindow= 0
|
||||
see "Instruction : I want window" + nl
|
||||
ok
|
||||
if nWindowTitle = 0
|
||||
nWindowTitle++
|
||||
ok
|
||||
|
||||
func settitle cValue
|
||||
if nWindowTitle = 1
|
||||
nWindowTitle=0
|
||||
see "Instruction : Window Title = " + cValue + nl
|
||||
ok
|
||||
|
||||
private
|
||||
|
||||
# Attributes for the instruction I want window
|
||||
i want window
|
||||
nIwantwindow = 0
|
||||
# Attributes for the instruction Window title
|
||||
# Here we don't define the window attribute again
|
||||
title
|
||||
nWindowTitle = 0
|
||||
# Keywords to ignore, just give them any value
|
||||
the=0
|
||||
Loading…
Add table
Add a link
Reference in a new issue