Explorar o código

moving samples

abakobo %!s(int64=8) %!d(string=hai) anos
pai
achega
54307139b8

+ 0 - 30
samples/language/enums/enums.monkey2

@@ -1,30 +0,0 @@
-
-#Import "<std>"
-Using std..
-
-Enum myEnum
-	a=1 'OOOOI
-	b=2 'OOOIO
-	c=4 'OOIOO
-	d=8 'OIOOO
-	e=16'IOOOO
-End
-
-Function Main()
-
-	Local E:myEnum
-	Local F:myEnum
-
-
-	E=E.a | E.d | E.e '11001
-	E=E ~ ( E.a | E.b ) '11001 ~ (00001 | 00010 )
-	                    '11001 ~      00011
-
-	                    '11001
-	             ' XOR  '00011
-							 '      -------
-	                    '11010
-											
-	F=E & E.d
-	F=F ~ ( E.e | E.d )
-End

+ 0 - 22
samples/language/functions/function_variable.monkey2

@@ -1,22 +0,0 @@
-Namespace myapp
-#Import "<std>"
-Using std..
-
-class C
-   field t:=10
-   method test:void()
-      print "haha "+t
-   end
-End
-
-Function ftest:Void(i:int)
- Print "hoho "+i
-End
-
-function Main:void()
-   local c:=New C
-   Local f:void()=c.test ' a function varable that has a class method as function
-   f() 'calling that method
-   Local f2:Void(i:int)=ftest ' a function variable that has a function as function
-   f2(15) 'calling that function
-end

+ 0 - 33
samples/modules/mojo/hello_mojo.monkey2

@@ -1,33 +0,0 @@
-
-Namespace myapp
-
-#Import "<std>"
-#Import "<mojo>"
-
-Using std..
-Using mojo..
-
-Class MyWindow Extends Window
-
-	Method New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=Null )
-
-		Super.New( title,width,height,flags )
-	End
-
-	Method OnRender( canvas:Canvas ) Override
-	
-		App.RequestRender()
-	
-		canvas.DrawText( "Hello World!",Width/2,Height/2,.5,.5 )
-	End
-	
-End
-
-Function Main()
-
-	New AppInstance
-	
-	New MyWindow
-	
-	App.Run()
-End