Odin andromax c2 new8/31/2023 ![]() The length of a string can be found using the built-in len proc: len("Foo") Raw string literals are enclosed in single back ticks. Special characters are escaped with a backslash \. ![]() String literals are enclosed in double quotes and character literals in single quotes. This is to allow for future work on automatic documentation tools. Multi-line comments can be also be nested (unlike in C): /*Ĭomments are parsed as tokens within the compiler. Multi-line comments begin with /* and end with */. My_integer_variable: int // A comment for documentation Single line comments begin with //: // A comment Lexical elements and literals # Comments #Ĭomments can be anywhere outside of a string or character literal. To tell it to treat a single file as a standalone package, add -file, like so: odin run hellope.odin -file Odin thinks in terms of directory-based packages. If you do not wish to run the executable after compilation, the build command can be used. odin file to an executable and then runs that executable after compilation. odin file, then compile and run it using odin run. To begin this tour, let us start with a modified version of the famous “hello world” program: package main ![]() It is recommend to read the Getting started with Odin guide. This tutorial assumes a basic knowledge of programming concepts such as variables, statements, and types. This article is a basic tutorial for the programming language Odin.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |