documentation
Search
Search
SGScript - description
Why SGScript?
Code samples - SGScript
Code samples - the C API
Language reference
Variable types
Conversion rules
Code structure
Constants
Identifiers
Expressions
Statements
Built-in accessors
Classes
Numeric string parsing rules
C API reference
Constants and types
Main types
Error codes
Variable type codes
Concepts & systems
Messaging system
Iterator system
Garbage collection system
Metamethods
Closures
Functions
Context management
Memory management
Input / output
Code handling
Introspection / debugging helpers
Execution control
Binding helpers
Object type storage
Variable initialization
Stack primary interface
Sub-item usage
Argument handling
Virtual machine operations
String helpers
Container helpers
Data retrieval & conversion
Iterators
Variable ownership
String generation helper interface
Utility functions
ALL functions (A-Z)
sgs_CreateEngine [function alias]
sgs_CreateEngineExt [function]
sgs_DestroyEngine [function]
sgs_RootContext [function]
sgs_ForkState [function]
sgs_ReleaseState [function]
sgs_PauseState [function]
sgs_ResumeState*** [functions]
sgs_ResumeState [function alias]
sgs_CreateSubthread [function]
sgs_ProcessSubthreads [function]
sgs_EventState [function]
sgs_EndOn [function]
sgs_ExecString [function alias]
sgs_ExecBuffer [function alias]
sgs_EvalString [function alias]
sgs_EvalBuffer [function]
sgs_ExecFile [function alias]
sgs_EvalFile [function]
sgs_Include [function alias]
sgs_IncludeExt [function]
sgs_Compile [function]
sgs_DumpCompiled [function]
sgs_LoadLib_*** [functions]
sgs_Reg***Consts [function]
sgs_Make*** [functions]
sgs_Init*** [functions]
sgs_Create*** [functions]
sgs_Push*** [functions]
sgs_StoreVariable [function]
sgs_Pop [function]
sgs_PopSkip [function]
sgs_InsertVariable [function]
sgs_PushItem [function alias]
sgs_GetIndex [function]
sgs_SetIndex [function]
sgs_PushIndex [function]
sgs_PushProperty [functions]
sgs_SetProperty [functions]
sgs_PushNumIndex [function]
sgs_SetNumIndex [function]
sgs_GetGlobal [function]
sgs_SetGlobal [function]
sgs_PushGlobalByName [function]
sgs_GetGlobalByName [function]
sgs_SetGlobalByName [function]
sgs_Registry [function]
sgs_GetEnv [function]
sgs_SetEnv [function]
sgs_PushEnv [function]
sgs_PushPath [function]
sgs_StorePath [function]
sgs_Store***Consts [functions]
sgs_ArgErrorExt [function]
sgs_ArgError [function]
sgs_***ArgError [function aliases]
sgs_LoadArgsExt(VA) [function]
sgs_LoadArgs [function alias]
sgs_ParseMethod [function]
SGS_PARSE_METHOD [function alias]
sgs_Method [function]
sgs_(Force)HideThis [functions]
sgs_ArgCheck_Object [function]
sgs_ObjectArg [function]
sgs_XFCall [functions]
sgs_X(This)Call [function aliases]
sgs_FCall [functions]
sgs_(This)Call [function aliases]
sgs_GlobalCall [function]
sgs_TypeOf [function]
sgs_DumpVar [function]
sgs_GCExecute [function]
sgs_DebugDumpVarExt [functions]
sgs_DebugDumpVar [function alias]
sgs_DebugPrintVar [function alias]
sgs_PadString [function]
sgs_ToPrintSafeString [function]
sgs_StringConcat [function]
sgs_CloneItem [function]
sgs_RegSymbol [function]
sgs_GetSymbol [function]
sgs_Serialize(Ext) [functions]
sgs_Unserialize(Ext) [functions]
sgs_SerializeObject [function]
sgs_SerializeObjIndex [function]
sgs_SerializeSGSON [function]
sgs_UnserializeSGSON(Ext) [functions]
sgs_Assign [function]
sgs_ArithOp [function]
sgs_IncDec [function]
sgs_Compare [function]
sgs_EqualTypes [function]
sgs_Get*** [functions]
sgs_To*** [functions]
sgs_ToStringBuf(Fast)(P) [functions]
sgs_ToString(Fast)(P) [function aliases]
sgs_RegisterType [function]
sgs_UnregisterType [function]
sgs_FindType [function]
sgs_PushInterface [function]
sgs_InitInterface [function]
sgs_IsObject(P) [functions]
sgs_IsType(P) [function aliases]
sgs_IsCallable(P) [functions]
sgs_IsNumericString [function]
sgs_Parse*** [functions]
sgs_Global*** [functions]
sgs_PushIterator [functions]
sgs_GetIterator [functions]
sgs_IterAdvance [functions]
sgs_IterPushData [functions]
sgs_IterGetData [functions]
sgs_IsArray [function]
sgs_IsDict [function]
sgs_IsMap [function]
sgs_ArraySize [functions]
sgs_ArrayPush [function]
sgs_ArrayPop [function]
sgs_ArrayErase [function]
sgs_ArrayFind [function]
sgs_ArrayRemove [function]
sgs_Unset [function]
sgs_StackSize [function]
sgs_SetStackSize [function]
sgs_SetDeltaSize [function]
sgs_AdjustStack [function]
sgs_AbsIndex [function]
sgs_IsValidIndex [function]
sgs_OptStackItem [function]
sgs_StackItem [function]
sgs_GetStackItem [function]
sgs_SetStackItem [function]
sgs_ItemType [function]
sgs_Acquire(Array) [function]
sgs_Release(Array) [function]
sgs_GCMark(Array) [function]
sgs_ObjAcquire [function]
sgs_ObjRelease [function]
sgs_ObjGCMark [function]
sgs_ObjAssign [function]
sgs_ObjCallDtor [function]
sgs_ObjSetMetaObj [function]
sgs_ObjGetMetaObj [function]
sgs_ObjSetMetaMethodEnable [function]
sgs_ObjGetMetaMethodEnable [function]
sgs_GetStringPtr(P) [functions]
sgs_GetStringSize(P) [functions]
sgs_GetObjectStruct(P) [functions]
sgs_GetObjectData(P) [functions]
sgs_GetObjectIface(P) [functions]
sgs_SetObjectData(P) [functions]
sgs_SetObjectIface(P) [functions]
sgs_StdOutputFunc [function]
sgs_Get(Err)OutputFunc [function]
sgs_Set(Err)OutputFunc [function]
sgs_(Err)Write [function]
sgs_(Err)WriteStr [function alias]
sgs_(Err)Writef [function]
sgs_StdMsgFunc(_NoAbort) [functions]
sgs_GetMsgFunc [function]
sgs_SetMsgFunc [function]
sgs_GetScriptFSFunc [function]
sgs_SetScriptFSFunc [function]
sgs_StdScriptFSFunc [function]
sgs_Msg [function]
sgs_WriteErrorInfo [function]
sgs_PushErrorInfo [function]
sgs_HasFuncName [function]
sgs_FuncName [function]
SGSFN [function alias]
SGSBASEFN [function alias]
sgs_SetHookFunc [function]
sgs_GetHookFunc [function]
sgs_DefaultMemFunc [function]
sgs_Memory [function]
Memory allocation macros [macros]
sgs_CodeString [function]
sgs_Abort [function]
sgs_Stat [function]
sgs_Cntl [function]
sgs_StackFrameInfo [function]
sgs_GetFramePtr [function]
sgs_Errno [function alias]
sgs_SetErrno [function alias]
sgs_GetLastErrno [function alias]
sgs_PushStringAlloc [function]
sgs_InitStringAlloc [function]
sgs_FinalizeStringAlloc(P) [functions]
Interface implementation
C Functions
Object interface
Interaction with the environment
Commonly required advanced tasks
Standard library reference
Core library
array [function]
array_sized [function]
dict [function]
map [function]
class [function]
array_filter [function]
array_process [function]
dict_filter [function]
map_filter [function]
map_process [function]
dict_size [function]
map_size [function]
isset [function]
unset [function]
clone [function]
get_keys [function]
get_values [function]
get_concat [function]
get_merged [function]
get_merged_map [function]
get_iterator [function]
iter_advance [function]
iter_getdata [function]
tobool [function]
toint [function]
toreal [function]
tostring [function]
toptr [function]
parseint [function]
parsereal [function]
typeof [function]
typeid [function]
typeptr [function]
typeptr_by_name [function]
is_numeric [function]
is_callable [function]
is_array [function]
is_dict [function]
is_map [function]
print, println, printlns, errprint, errprintln, errprintlns [functions]
printvar_ext [function]
printvar [function]
read_stdin [function]
ftime [function]
rand [function]
randf [function]
srand [function]
hash_fnv [function]
hash_crc32 [function]
va_get_args [function]
va_get_arg [function]
va_arg_count [function]
metaobj_set [function]
metaobj_get [function]
metamethods_enable [function]
metamethods_test [function]
mm_getindex_router [function]
mm_setindex_router [function]
event [function]
pooled_event [function]
end_on [function]
co_create [function]
co_resume [function]
thread_create [function]
subthread_create [function]
process_threads [function]
yield [function]
abort [function]
sys_apply [function]
pcall [function]
assert [function]
sym_register [function]
sym_get [function]
eval [function]
eval_file [function]
compile_sgs [function]
include_library [function]
include_file [function]
include_shared [function]
find_include_file [function]
include [function]
import_cfunc [function]
sys_curfile [function]
sys_curfiledir [function]
sys_curprocfile [function]
sys_curprocdir [function]
multiply_path_ext_lists [function]
sys_backtrace [function]
sys_msg [function]
INFO [function]
WARNING [function]
ERROR [function]
app_abort [function]
app_exit [function]
sys_replevel [function]
sys_stat [function]
errno [function]
errno_string [function]
errno_value [function]
dumpvar_ext [function]
dumpvar [function]
gc_collect [function]
serialize [function]
unserialize [function]
sgson_encode [function]
sgson_decode [function]
SGS_*** [constants]
VT_*** [constants]
RAND_MAX [constant]
_G [superglobal]
_R [superglobal]
_F [superglobal]
_T [superglobal]
array [object]
array.push [method]
array.pop [method]
array.shift [method]
array.unshift [method]
array.insert [method]
array.erase [method]
array.part [method]
array.clear [method]
array.reverse [method]
array.resize [method]
array.reserve [method]
array.sort [method]
array.sort_custom [method]
array.sort_mapped [method]
array.find [method]
array.remove [method]
array.unique [method]
array.random [method]
array.shuffle [method]
dict [object]
map [object]
ALL SGScript core functions (A-Z)
Formatting library ("fmt")
fmt_pack [function]
fmt_unpack [function]
fmt_pack_count [function]
fmt_pack_size [function]
fmt_base64_encode [function]
fmt_base64_decode [function]
fmt_custom_encode [function]
fmt_text [function]
fmt_parser [function]
fmt_string_parser [function]
fmt_file_parser [function]
fmt_charcc [function]
fmt_parser [object]
fmt_parser.read [method]
fmt_parser.getchar [method]
fmt_parser.readcc [method]
fmt_parser.skipcc [method]
fmt_parser.read_real [method]
fmt_parser.read_int [method]
fmt_parser.read_binary_int [method]
fmt_parser.read_octal_int [method]
fmt_parser.read_decimal_int [method]
fmt_parser.read_hex_int [method]
fmt_parser.check [method]
ALL SGScript formatting functions (A-Z)
I/O library ("io")
io_setcwd [function]
io_getcwd [function]
io_getexecpath [function]
io_rename [function]
io_file_exists [function]
io_dir_exists [function]
io_stat [function]
io_dir_create [function]
io_dir_delete [function]
io_file_delete [function]
io_file_write [function]
io_file_read [function]
io_file [object]
io_file.open [method]
io_file.close [method]
io_file.read [method]
io_file.write [method]
io_file.seek [method]
io_file.flush [method]
io_file.setbuf [method]
io_file [function]
io_dir (directory_iterator) [object]
io_dir [function]
FILE_*** [constants]
SEEK_*** [constants]
FST_*** [constants]
ALL SGScript I/O functions (A-Z)
Math library ("math")
abs [function]
floor [function]
ceil [function]
round [function]
pow [function]
sqrt [function]
log [function]
sin [function]
cos [function]
tan [function]
asin [function]
acos [function]
atan [function]
atan2 [function]
deg2rad [function]
rad2deg [function]
M_*** [constants]
ALL SGScript math functions (A-Z)
OS library ("os")
os_gettype [function]
os_command [function]
os_getenv [function]
os_putenv [function]
os_time [function]
os_get_timezone [function]
os_date_string [function]
os_parse_time [function]
os_make_time [function]
os_get_locale [function]
os_set_locale [function]
os_get_locale_format [function]
os_locale_strcmp [function]
LC_*** [constants]
ALL SGScript OS functions (A-Z)
Regular expression library ("re")
re_match [function]
re_match_all [function]
re_replace [function]
RE_RETURN_*** [constants]
ALL SGScript RegExp functions (A-Z)
String library ("string")
string_utf8_iterator [object]
string_cut [function]
string_part [function]
string_reverse [function]
string_pad [function]
string_repeat [function]
string_count [function]
string_find [function]
string_find_rev [function]
string_replace [function]
string_translate [function]
string_trim [function]
string_toupper [function]
string_tolower [function]
string_compare [function]
string_implode [function]
string_explode [function]
string_charcode [function]
string_frombytes [function]
string_utf8_decode [function]
string_utf8_encode [function]
string_utf8_offset [function]
string_utf8_length [function]
string_utf8_iterator [function]
string_format [function]
ALL SGScript string functions (A-Z)
Included tools
Virtual Machine (sgsvm)
Compiler (sgsc)
Executable generator for Windows (sgsexe)
Language test application (sgstest)
API test application (sgsapitest)
C++ binding compiler test application (sgscppbctest)
Multithreading safety test application (mttest)
Profiler
Interactive debugger
Additional info
Serialization in SGScript
Secure sandbox environment
SGScript
>>
Standard library reference
>>
Core library
>>
array_process [function]
array_process( array, callable )
return an array with the items passed through a callable
two arguments are passed to the callable: value, index