This page shows an overview of all features and changes in Neon over time, version by version.
index function now works on stringshelp() for a built-in functionbin and hex functions to convert numbers to decimal and binarysaveObj and loadObj functions to save any Neon object to a fileinitGraphics function, replaced by an init statement that takes native module names as arguments and initializes themformat functionhash function to hash any objectraise, and to specify additional argumentsis operatortype functiondefine(var1, var2, ...) statement to define symbolic constantssetColor function (constants instead of strings)Grey, Orange, and Purple__launcher__.ne file (or LAUNCHER on TI_EZ80), and runs this file directly if it is present. Neon ships with a graphical launcher for TI_EZ80.detectFiles function to detect files based on a given prefixsafeExec function that allows a Neon program to be launched in a new environmentexcept blocksAns variable that stores the result of expressions in the terminalhelp function featuresgc function that invokes it~ character in identifier names to define modules (for building abstractions)loadNamespace function to use functions without the Prefix~help function features: display of variable types in help('variables'), added help('modules'), and display of help for a modulesetColor functionadd, sub, mul, div, minus, pow, mod, eucl, in operators as well as == and comparison, which now returns an integerexception function and renamed it to raisefor loops, to omit the starting value, and to iterate over lists and stringsor and and operatorsNumber type into Integer and RealKeyboardInterrupt exception that triggers when Ctrl+C or Ctrl+D is pressed while a program is running<->setFunctionDoc function to document user functionsfor loops now automatically make their index variable localparallel keywordPromise type to handle process return valuesawait keyword for passive waiting within a processsetAtomicTime function to control interleavingreadFile and writeFile functions. Use help(readFile) and help(writeFile) for more information.:= was replaced with ->. So a := 5 becomes 5 -> a. The advantage is that chained assignments can now be done easily: 5 -> a -> b -> c -> d-> was replaced with <-. Instead of 5 -> "a", it is now written "a" <- 5@ operator instead of :.Example:
a = Cmplx(re:1, im:2)
To access a field, write object>>field. For example here, a>>re equals 1 and a>>im equals 2.
if (condition1) then
instructions1
elif (condition2) then
instructions2
else
instructions3
end
Of course the elif and else parts are not mandatory; if they are omitted, the block just needs to be closed with an end.
__name__, __platform__, and __version__ allowing you to know, respectively, the name of the current program, the platform Neon is running on, and the version of Neon.'. The only restriction is that it cannot be placed at the start.in operator that searches for an element in a list. Example: 5 in [1,2,5] returns True=> corresponding to logical implication, and an operator EE (x times 10 to the power of). So 1 EE 6 = 1 000 000.index, replace, count, list, sort_asc, sort_desc, sin, cos, tan, deg, rad, sqrt, ln, exp, log, log2, round, abs, ceil, floor. Type help(function_name) in Neon for more information.pi variable containing 3.141593...int function that returns the integer part of a number<, >, <=, >= to also compute lexicographic ordertry/except blocks to handle errors.=> (implies)assert, output, chr, ord, list_comp, create_exception, and exceptionfunction(arg1, arg2, ...) you can write arg1.function(arg2)0x and 0b prefixes for writing numbers in hexadecimal and binarydo and end keywords, which work exactly like { and }.EE operator equivalent to x times 10 to the power of= operator, which now returns None:= operator, which works like = but returns the assigned valuelocal(var1, var2, ..., varn) turns global variables into local variables.break, continue, and pass statementsfunction name(param1, param2, ...) {
return ( param1 + param2 )
}
method append_item(list, element) {
append(list, element)
}
import keyword: import ( "module", "math" )del operator to delete a variable:a = 5
del a # a can no longer be used