Nasal library functions: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Please see → Please first see)
m (→‎num(): Added short info)
Line 20: Line 20:
== int() ==
== int() ==


== num() ==
== num(str) ==
 
Convert string to number.


== streq() ==
== streq() ==

Revision as of 03:19, 24 November 2014


Please first see: http://plausible.org/nasal/lib.html

size()

keys()

append()

pop()

setsize()

subvec()

delete()

int()

num(str)

Convert string to number.

streq()

cmp()

substr()

chr()

contains()

typeof()

ghosttype(ghost)

Returns a string containing either a descriptive name as passed to naNewGhost or naNewGhost2 in C/C++ while creating the ghost or a unique id (aka the pointer to the C/C++ naGhostType instance) if no name has been set.

compile()

call()

die()

sprintf()

caller()

closure()

find()

split()

rand()

bind()

sort()

id()

math

sin()

cos()

tan()

asin()

acos()

atan2()

exp()

ln()

pow()

sqrt()

floor()

ceil()

fmod()

clamp()

periodic()

round()

pi

e

io

  • SEEK_SET
  • SEEK_CUR
  • SEEK_END
  • stdin
  • stdout
  • stderr

stat()

directory()

returns the files in a given directory

e.g. chatter_list = directory( chatter_dir );

open()

read()

readln()

seek()

tell()

write()

flush()

close()

utf8

chstr()

strc()

substr()

size()

validate()