Polski
huginn - programming language with no quirks, so simple every child can master it.
Fork me on GitHub git clone https://codestation.org/repo/huginn.git
git clone https://github.com/AmokHuginnsson/huginn.git
git clone https://bitbucket.org/huginn/huginn.git
  1. Syntax
  2. Keywords
  3. Types

    Huginn provides several built-in scalar and collection types, as well as user defined compound types.

    integer real string number character boolean list deque dict order lookup set
  4. Built-ins
  5. Core library classes
  6. Packages

The boolean is a scalar type that is used to represent and operate on boolean values. It supports basic operations of negation, logical "and", "or", and "xor" and comparisons.

Editor (vim) - boolean.hgn [+line no]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#! /bin/sh
exec huginn --no-argv -E "${0}" "${@}"
#! huginn

main() {
	b = 17 % 4 == 3;
	print( "type of b is {}\n".format( type( b ) ) );
	if ( b ) {
		print( "value of b is true\n" );
	} else {
		print( "value of b is false\n" );
	}
	x = | -10 | > 5;
	print( "type of x is {}\n".format( type( x ) ) );
	if ( ! x ) {
		print( "value of x is false\n" );
	} else {
		print( "value of x is true\n" );
	}
	return ( 0 );
}

Program output:

Terminal - shell session [–line no]
[amok@vegeta](2/1)~/$ ./boolean.hgn
type of b is boolean
value of b is false
type of x is boolean
value of x is true
[amok@vegeta](2/1)~/$