Basic

Defines language utilities like the type introspection system.

Listing

Constants

TAUConstant doc comments first line.
TAU64Constant doc comments first line.

Fields

_type_tableThe entry point for type introspection; an array of Type_Info.

Procedures

add_build_file()
foreign
add_build_string()
foreign
set_build_file_path()
foreign
update_build_options()
foreign
array_add()appends item to array, occupying the new highest index slot. Indices are zero-based.
array_add_if_unique()FIXME: add description. Procedure description doc comments first line.
array_unordered_remove()FIXME: add description. Procedure description doc comments first line.
array_reserve()FIXME: add description. Procedure description doc comments first line.

Enums

Optimization_LevelFlags to signal degree of effort (and time) the compiler should spend optimizing.
Type_Info_TagEnumeration of the type categories supported by Jai.

Structs

_AnyData structure backing the Any type.
Build_OptionsFlags to the compiler for controlling build-time behavior.
Type_InfoMetadata for the types that appear in your program.
Type_Info_IntegerType info data structure for integer numbers.
Type_Info_FloatType info data structure for floating point numbers.
Type_Info_PointerType info data structure for pointers.
Type_Info_ProcedureType info data structure for procedures.
Type_Info_StructType info data structure for structs.
Type_Info_Struct_MemberType info data structure for members of structs.

Details

Constants

TAU

Declared in: Basic.jai
TAU : float : 6.283147;

Constant doc comments first line.

Second.line

See Also

TAU64

Declared in: Basic.jai
TAU64 : float64 : 6.283185307179586;

Constant doc comments first line.

See Also

Video references

Fields

_type_table

Declared in: Basic.jai
_type_table : [] ^Type_Info;

The entry point for type introspection; an array of Type_Info.

toggle example
print_all_types.jai

See Also

Video references

  • _type_table is an array of Type_Info.
    “Demo: Run-Time (and Compile-Time) Type Information” YouTube, uploaded by Jonathan Blow, Feb 11, 2015, https://youtu.be/JoNkttD_MUs?t=213
  • print_all_types iterates over _type_table and prints information about each type.
    “Demo: Run-Time (and Compile-Time) Type Information” YouTube, uploaded by Jonathan Blow, Feb 11, 2015, https://youtu.be/JoNkttD_MUs?t=399

Procedures

add_build_file()
foreign

add_build_file :: (filename: string) #foreign;

Video references

filename:stringname of file to be added to compilation project

add_build_string()
foreign

add_build_string :: (data: string) #foreign;

Video references

data:stringFIXME: add description

set_build_file_path()
foreign

set_build_file_path :: (filename: string) #foreign;

Video references

filename:stringFIXME: add description

update_build_options()
foreign

update_build_options :: () #foreign;

Video references

array_add()

Declared in: Basic.jai
array_add :: (array: ^[..] $T, item: T);

appends item to array, occupying the new highest index slot. Indices are zero-based.

Video references

array:^[..] $Tarray of any type
item:Titem to add (must be of same type)

array_add_if_unique()

Declared in: Basic.jai
array_add_if_unique :: (array: ^[..] $T, item: T) -> bool, s64;

FIXME: add description. Procedure description doc comments first line.

Additional procedure description documentation comments.

Video references

array:^[..] $TFIXME: add description
item:TFIXME: add description

array_unordered_remove()

Declared in: Basic.jai
array_unordered_remove :: (array: ^[..] $T, item: T) -> s64;

FIXME: add description. Procedure description doc comments first line.

Additional procedure description documentation comments.

Code sample:

for array
  if it == null return it_index;

Video references

array:^[..] $TFIXME: add description
item:TFIXME: add description

array_reserve()

Declared in: Basic.jai
array_reserve :: (array: ^[..] $T, count: s64) -> s64;

FIXME: add description. Procedure description doc comments first line.

Additional procedure description documentation comments.

Code sample:

for array
  if it == null return it_index;

Video references

array:^[..] $TFIXME: add description
count:s64number of slots to pre-allocate for items of type T

 

 

 

 

 

 

 

 

 

 

jailang 2019 pixeldroid
https://github.com/pixeldroid/jailang
programming pages theme v0.5.21 (https://github.com/pixeldroid/programming-pages)