Skip to content
John Bampton edited this page Jul 15, 2023 · 21 revisions

Welcome to the One wiki!

One is an open source system programming language that makes it easy to build reliable, efficient and performant software.



Getting started



Types

  • UInt8

  • UInt16

  • UInt32

  • UInt64

  • Int8

  • Int16

  • Int32

  • Int64

  • Size

  • USize

  • Float32

  • Float64

  • Float80

  • Char

  • String

  • Bool

  • Function



Comment



One-Line

The "one-line" comment styles only comment to the end of the line or the current block of code.

such as below codes :

//here is a one-line comment.
//programmer : name
//date : 2012


Multi-Line

The "multi-line" comment styles start of /* and end of */.

such as below codes :

/*
 Programmer : Name
 Date : 2013
*/
/*
 * Programmer : Name
 * Date : 2013
 */


Variable

<type> <name> [=<value>] ;

such as below codes :

string name;

int age=53;


Function

<return_type> <name>( [<type> <name>,] )
{
   <statements>
}

such as below codes :

void test()
{

}

int name(string name)
{
   return 5;
}


Hello World

void main()
{
   print "Hello, World!";
}


Clone this wiki locally