Search: in
Qu
Qu Encyclopedia
  Tutorials     Encyclopedia     Dictionary     Directory  
Qu Email this to a friend      Qu

Qu

Qu
Qu

Qu

For other uses, see QU

Qu is a computer programming language with an open-source interpreter written in C by Marc Krisnanto. It is comparable to Python, Ruby, Perl and many others.

The language is semi-dynamic, and optionally strongly typed, with full object orientation. All variables in the language are first class objects.

The design and implementation focuses on compactness and speed, using the GNU Lightning Just In Time compiler (JIT).

Examples

# Ackermann 

if not (__arg__) # get input;
  println("Ackermann's function ...")
  println("Enter a number on the command line!")
else
  NUM = Int(__arg__[0])
  printf('Ack (3,%d): %d\n', NUM, Ack(3, NUM))
end if  

sub Ack(m, n) # one way
  if m == 0 return n + 1
  elif n == 0 return Ack(m - 1, 1)
  else return Ack(m - 1, Ack(m, n - 1));;
;;

 # alternate way

sub ackermann (m, n) 
    return m ? (n ? ackermann (m - 1, ackermann (m, n - 1)) :
               ackermann (m - 1, 1)) : n + 1
;;

See also

Queens New York A borough of New York City

External links

nah:Qu


Qu
Qu
Qu

Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article

Qu
Qu
Search for Qu in Tutorials
Search for Qu in Encyclopedia
Search for Qu in Dictionary
Search for Qu in Open Directory
Search for Qu in Store
Search for Qu in PriceGig


Help build the largest human-edited directory on the web.
Submit a Site - Open Directory Project - Become an Editor

Qu
Advertisement

Advertisement



Qu
Qu top Qu

Home - Add TutorGig to Your Site - Disclaimer

©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement