Version 2.2.1
- Modified how tmp variables are initially created, old way created
one a time. New way, creates 1000
at a time
- Modified how hsms msgs are read, old way was one char at a time, New
way attempts to read up to 1k blocks
- Fixed bug with get_tmp_var() function, where var's with vals equal
to "", were not returned.
The "dump" cmd worked OK
- Added a LOG msg when reading hsms msgs after the read is complete
and before decoding happens
Version 2.2.0 Beta
- Modified the encoding and decoding of secs messages for
performance
- Modified sc to support the following preprocessing program
statements:
#include (Include
file)
#define name
(define a name)
#define name=value (define a name with a
value)
#ifdef name,
#else, and #endif (Conditionally
include program statements)
-P (turn on
preprocessing)
-D name (define a
name)
-D name=value
(define a name with a value)
-I path (define a
path for include files)
- Modifed the sc commands to allow for abbreviated usage: read,
list, kill, etc...
- Supports C style comments in sc programs (/*... */)
- Added sc check for missing closing (\")s and (')s
Version 2.1.1
- SML
format for float values, F4 and F8, now allow the value to be entered in
hex format (‘\xhhh...hh’). Use single quotes, not double, because
the hex value will be converted into a hex value, first 2 bytes.
- Modified how sc runs in debug mode
(-d). Now uses a file, sc.debug,
to define which modules prints debug statements. The level defined with the –d is needed to define the level
of debug within the modules.
Version 2.1
- Program
token storage
- The
storage of program tokens has been modified. Before, token values were stored as null terminated
strings. Now they are stored with
defined length. This will allow
token values to contain null characters.
Example: the string “Hello\x00World” can now be properly stored.
- Secs
messages and tmp variables
- Like
token values above, tmp variables are now stored with a defined
length. Now a secs message with
an ASCII data type can contain null characters.
- The
creation of tmp variables from secs messages has been modified. In the past, the decode secs message
was converted into name/value pairs.
The values were “” delimited.
This presented a problem if the value contained a “ (ex: <A
“The pump is “ON””>, the value returned was “The pump is” because the
“ON” terminated the string prematurely).
Now tmp variables are created directly from the decode secs
message. This will create a
problem with existing applications if users were coding around this bug.
- Pragmas
are now supported. They are used
to control features of sc. New
features can be enabled using a pragma as well as supporting existing
functionality. Current pragmas
include:
- LOG_CPU_USAGE
– When defined, logs a cpu usage message in the logs.
- SHOW_NON_PRINTING_CHARS_IN_BRACES
– When defined, instructs sc to show non-printing chars as {hh} in the
log files, or other output, instead of showing them as \xhh.
- NO_BLOCK_ON_SLEEP
– When defined, instructs sc to not block on the sleep command,
but to use an internal sc timer instead.
While sleeping, sc can handle other events and commands.
- NO_SOURCE_CODE_LINE_NUMBERS
– When defined, instructs sc not to show the source code file and line
number when an error or warning is detected. Source code and line numbers are still displayed for fatal
error conditions.
- New
data type called local_var, which is used to define local
variables. Local variables can be
used after a label to define a local instance of that
variable. Local vars can be
initially assigned to an expression.
local_var x = 5*100
- Miscellaneous
- New
functions, trace(1) and trace(0), to turn on and off sc
program statements being logged as they are executed.
-
- Fixed
the list command
- Added
an optional no_parese parameter to the system command to not parse those
characters.
- User
variables and tmp variables no longer share the same space. Each is stored in separate areas.
- Modifed
how for loops are implemented.
They now use a “nest” count just like while loops.
- Gosub’s
with parameters are now supported.
Parameters can be both passed by reference and passed by
value. Example: gosub add ($value1, $value2, result). Value1 and value2 are
passed by value, while result is passed by reference.
Version 2.0.6
- Added
a cpu usage LOG statement when sc goes idle
- Fixed
a bug with secs/hsms msgs and the W bit flag where sc was waiting for a
reply even when the W bit was not set
- Fixed
a bug with the unary +
- Added
the ~ one's complement unary operator
- Fixed
a bug where the command line arguments were generating errors if not
enough supplied
Version 2.0.5
- Fix
a bug where function calls within function calls were not working. This bug was introduced a few versions
ago.
Version 2.0.4
- New
command \"load\" that works just like the old \"read\"
command (included in version 2.0.3)
- New
operand \"^\" for bitwise xor-ing
- Fixed
bug with the \"open\" command and the \"error=<>,
no_error\", this did not work before
Version 2.0.3
- Mod
so that tmp variables are kept separate form others. Did this for performance reasons.
- Fixed
an old bug where is_tmp_var() returned true when the tmp variable did not
exist.
- Fixed
core dump for \"sc -i -c \" , the -c option has no argument
- Fixed
bug with no_error within a gosub, and not being able to return
Version 2.0.2
- Fixed
sc looping problem with connected client
- Mod
the disconnect routine in server.c.
This had some bugs handling clients and servers that terminate.
- Mod
how the hsms sends messages, This was causing some problems with tools
Version 2.0.1
- Fix
bug for program files that have the <cr><nl>. This is treated as a single <nl>
- Fixed
a sc -r mistake about the
break/break_loop statements
- Now supports
the // style comments
- Fixed
a bug in the htof() function
Version 2.0 - Open Source
- New
function get_client() to return the connected client
- New
function get_version() to get the current version of sc
- Function
names are no longer reserved, and can now be used as variables names too
- Optional
arg to the send command to allow sending a message to a connected client
- With
version 2.0.7, the list command is broken. This is fixed in version 2.1
- Modify
the sleep command to not block, but allow other sc activity while
sleeping, and continue once the sleep is completed – Added in version 2.1