Skip to content

analang/como-lang-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMO: como object meta oriented

even.como

func isodd(num) {
	i = 0;
	odd = 0;
	while((i == num) == 0) {
		if(odd == 0) {
			odd = 1;
		} else {
			odd = 0;
		}
		i = i + 1;
	}
	return odd;
}

func print_even(num)
{
	while(num) {
		if(isodd(num)) {
			print(num + " is odd");
		} else {
			print(num + " is even");
		}
		num = num - 1;
	}
}

print_even(4);

range

func print_range(a, b) {
	while(a <= b) {
		print(a);
		a = a + 1;
	}
}

Build Requirements

I only compile this on UNIX like systems. You need the standard build tools such as autoconf, libtool, and flex and bison. Also there is a runtime requirement : libobject which you can get at https://github.com/libobject/libobject

License

Please see the file LICENSE located in the root directory of the project.