26 JUL 2004 ----------- This is yabasic version 2.75105 built on Windows Sun Jul 25 21:35:53 2004 Yabasic 2.751 compiled by Mike Huffman. Added functions and modifications listed below. Please note that this is an experimental version of Yabasic; most modifications are untested under Linux. See yab_add.html for more complete documentation. ------------------------------------------------------------------------ The following functions have been added: ucase$(), lcase$() mirror functionality of existing upper$() and lower$(). ucfirst$(), lcfirst$() similar to Perl functions; "capital cases" a string environ$("KEY") returns environment variable stored in KEY. space$(n) return string with n spaces string$(n, str$) return string with n characters from first char in str$ join$(str$, str_array$()), join$(str$, num_array()) create a string joined with str$ from elements of an array multi-dimensional arrays return string of entire array pos(), pos(n) return 0-based cursor column (x-coordinate) csrlin() return 0-based cursor row (y-coordinate) kill(s$), unlink(s$) delete file specified in s$ (wild-card expansion not currently supported) The following new sub-functions have been added to peek$(): peek$("yabasic") returns full path to current running yabasic.exe peek$("fullname") returns full path to current running program peek$("name") returns name of current running program peek$("history") returns interactive buffer as string peek$("history", "filespec") saves interactive buffer to filespec, returns buffer as string peek$("shortpath", longpath$) returns Windows short path name for Windows long path name The following sub-function has beed added to the poke statement: poke "env", "KEY=NAME" sets environment variable KEY to NAME The following statements have been added: environ "KEY=VALUE" sets environment variable KEY to VALUE. system statement ends program and returns to operating system mirrors Yabasic exit(0); compatible with QBasic / GW-Basic system statement shell, shell("cmd_str") statements Same as QBasic; start a new command shell, or run a shell command cls clears the screen with a call to system("cls") (Windows) or system("clear") on Linux clear screen (under Windows) has been modified such that the first call to clear screen preserves the current console foreground and background color attributes for subsequent calls to at() and print. A bug has been fixed in the putscreen statement Support for all Windows 2K/XP console colors has been added using the following names, including the Windows attribute: 0 = Black 8 = Gray 1 = Blue 9 = Light Blue 2 = Green A = Light Green 3 = Aqua B = Light Aqua * see note 4 = Red C = Light Red 5 = Purple D = Light Purple * see note 6 = Yellow E = Light Yellow * see note 7 = White F = Bright White Notes: * "Aqua" and "Purple" are synonyms for Yabasic names "Cyan" and "Magenta" respectively. * "Gold" maps to "Yellow" above since Yabasic already uses Yellow for "Light Yellow" above. getscreen$() and putscreen have been modified to reflect changes to clear screen and color During initialization the random number generator is seeded differently to make the first random number more random. The Yabasic interactive mode has been modified: Statements are now parsed and executed immediately. Compound statements (loops, if, switch, sub) must be completed before parsing; outer-most compound statement cannot have leading spaces, nested compound statements must be indented at least one space. NOTE: (1) This is very experimental; Yabasic was not designed for this type of interactive mode, and I have not altered Yabasic internals that would probably make it work better. NOTE: (2) When compiled on Linux the modified interactive mode does not work in combination with statements and functions using the curses library (clear screen, at(), etc,) NOTE: (3) Ver 2.75102 31 MAY 2004 added support for IF ... END IF Also fixed block statement scanning such that variables beginning with keyword characters don't enter block statements (e.g. variables like iffy = 4, forty = 40 work) NOTE: (4) Ver 2.75104 17 JUL 2004 added support for interactive history buffer; accessible via peek$("history") NOTE: (5) Ver 2.75105 25 JUL 2004 added a new command line option: -classic so that Yabasic can be started in "classic" interactive mode (e.g. as originally distributed) ------------------------------------------------------------------------ Build notes ----------- Yabasic and Windows sources opened in MS Visual C++ project then exported to yabasic.mak. configure, yabasic.flex, yabasic.bison executed under Cygwin on Windows XP Pro to create config.h, flex.c, and bison.c respectively. yabasic.exe compiled with MS Visual C++ 6.0, Sp 5 Build date in config.h is modified dynamically each compile to reflect current build date (see yabasic.mak and timestamp.yab). These modifications compile under Linux, however most are not tested in Linux and some are either not applicable, or there are known problems (see note regarding modified interactive mode above) ------------------------------------------------------------------------ yabdemo.yab ----------- Explicitly set sw (screen width) and sh (screen height) to 80 and 25 respectively so that menu does not scroll off screen on Windows 2000/XP. ------------------------------------------------------------------------ Mike Huffman mike-AT-mhuffman-DOT-com http://www.mhuffman.com/resource/basic/index.html