100 likes | 291 Views
glowworm. By Triplllier. WhaT IS Glowworm ?. Glowworm is a light, easy-learning procedure-oriented programming language. . Design pattern. PROGRAM STURCTURE. demo. type Struct:teststruct { int:anIntegerNumber , real:aRealNumber , string:anInterestingString ,
E N D
glowworm By Triplllier
WhaT IS Glowworm? • Glowwormis a light, easy-learning procedure-oriented programming language.
demo • type • Struct:teststruct • { • int:anIntegerNumber, • real:aRealNumber, • string:anInterestingString, • int:array[10]:anArrayOfInteger • } • endtyp
Demo • define • int:localVariable • enddef • forward • Func int:aFunctionUsingForwardDecalaration(int:arg), • Func int:aNormalFunction(int:arg) • endfwd • { • localVariable=aFunctionUsingForwardDeclaration(1); • aNormalFunction = localVariable; • }
demo • … • define • int:globalVariable • enddef • { • Standardoutput(‘Hello World!’); • }
Demo(quick sort) if (low<high) { i=low; x=A[low]; for j=low+1 to high do { if(A[j]<=x) { i=i+1; if(i!=j) { temp=A[i]; A[i]=A[j]; A[j]=temp; } } } temp=A[low]; A[low]=A[i]; A[i]=temp; w=i; }
Thanks! Q&A time