home *** CD-ROM | disk | FTP | other *** search
- GRASP 4.0 Readme File - February 1, 1991
-
- This file contains three sections:
-
- New features in GRASP 4.0
- Updating applications from GRASP 3.5 and previous versions
- Additions to the manual
-
- There are two additional Readme files, for TGL + and for the High-Level
- Language examples. TGL's Readme is in the TGL directory. The HLL
- Readme is in the HLL directory.
- You should replace your old manual with the new one provided with the soft-
- ware. There are major differences and additions to consider.
- -----------------------------------------------------------------------------
- Changes to the manual:
-
- SOUND: The PC Speaker is no longer an option. Command has changed.
- -----
-
- Enhancements to the manual:
-
- Clearscr, Data, Glib, Setupscr, Cap, Debug switch for Grasp, Graspc
- and Grasprt, Editor keys for search/replace
-
- New features not in the manual:
-
- Additional Functions (widths(), delete(), movemem), Additional
- Variables (read-only: @memfree, @memused, @txtbuf, @txtlen)
- -----------------------------------------------------------------------------
- New features in GRASP 4.0:
-
- GRASP now sports more than 100 commands, greatly improved performance,
- and many new features which give GRASP all the capabilities of other
- third-generation languages like C and Pascal. Here are some of
- the highlights:
-
- GRASP
-
- Video modes:
-
- GRASP supports the SVGA modes up to and including 1280 x 1024 x 256.
- Page 6-4 in the GRASP manual lists all of the modes. However, modes
- R through W are only supported within GRASP. They now work with most
- video systems that were available as of this date. All commands are
- fully functional in these video modes. Pictor does not support any
- hi-resolution 256 color modes such as 640X480X256 or 360X480x256 at this
- time. As new video boards are made available, the support for the SVGA
- modes for these boards will be available in future releases of GRASP.
- Pictor support of the SVGA modes is planned for a future release.
-
- Differential animation:
-
- The utility GDFF creates differential animation files which GRASP can
- play back. This technique saves the changes from one frame to another
- in a sequence of images, resulting in much smaller and faster animations.
- See page 2-13 for an introduction to the concept. Additionally, you can
- now play AutoDesk Animator FLI files in the same manner as the
- DFF files. Remember, FLI files are in video mode L only.
- =============================================================================
- Page 1
-
-
- =============================================================================
-
- DOS commands, CDs, and other devices:
-
- GRASP now has full multimedia capability. The INT command calls
- interrupts, which allows GRASP programs to control CD players and
- other devices and to issue DOS commands such as Make Directory. See
- the file CDCMD.TXT for examples. In addition you may load an ASCII file
- into memory, read, write, create and display that file or use the file
- in a data statement simply by using the Load command.
-
- Digitized Sound support:
-
- GRASP now supports the use of digitized sound through the Sound Blaster
- board, with support for Sound Blaster sound through other compatible
- boards. Support for other sound boards will be available at a later date.
-
-
- Conditional execution:
-
- GRASP features conditional execution in If-Else-Endif constructs,
- which can be built around value comparisons, user keystrokes, mouse
- clicks, and other testable conditions. See pages 3-34 through 3-37.
-
- Variables, operators, and functions:
-
- GRASP now allows variables and can perform string and math operations.
- See pages 3-28 and 3-29 for an introduction to variables, and pages
- 6-18 through 6-20 for lists of operators and functions. See also, the
- section of Variables and Functions in this Readme.
-
- Subroutines:
-
- You can now pass parameters (including expressions and variables) to
- subroutines. See pages 3-37 through 3-41 for details.
-
- Typographic controls:
-
- The Text command now wraps text within windows automatically, and you
- can choose left, center, or right alignment of text. Letter and word
- spacing can also be controlled. See page 4-106.
-
- Picture/clipping command use:
-
- All GRASP commands can now work with clippings or pictures. To use a
- clipping with a command designed for pictures such as Pfade, preface
- the buffer number with a C. To use a picture with a clipping command
- such as Putup, preface the buffer number with a P.
-
- Editor commands:
-
- The GRASP editor now has search and replace functions as well as
- additional user definable help screens. A new tutorial is included as
- well.
- =============================================================================
- Page 2
-
- =============================================================================
-
- PICTOR
-
- Quick keys:
-
- The quick-key feature has been expanded to include more menu options
- and to allow you to select all of the drawing tools. See section six
- of the Pictor manual for a complete list. Also note that it's no
- longer necessary to use the Alt key with a letter key to select menu
- options or tools, unless you're using the Text tool.
-
- VGA color cycling:
-
- In VGA modes you can cycle a range of colors on screen by pressing
- Tab. All colors from the left to the right mouse button color will
- begin shifting positions as they do in GRASP with the Cycle command.
- Tab again to speed up shifting; use Shift-Tab to slow it down and stop
- it. Press the Backspace key to reverse cycling direction.
-
- VGA color range adjustment:
-
- The range of colors from the left to the right mouse button color can
- be adjusted in hue, brightness, and contrast, using the Ctrl key with
- the function keys. These are listed in section six of the Pictor
- manual. Press the Asterisk key to restore the original palette, or
- save the image to make the adjustments permanent. Note that until you
- save the image and reload it, any adjustments you make with this
- feature affect the underlying palette.
-
- Edit menu and Change Colors dialog box:
-
- When the Change Colors dialog box is displayed, you can use the Edit
- menu functions Cut, Copy, Paste, and Invert Colors. They will operate
- on the selected range of colors (from left to right button color).
- Copy and Paste make it easy to move ranges of colors in 256-color
- mode. To use this feature, just click on Edit on the menu bar or
- press the quick key for the function you want (C for Copy, for example).
-
- Artools
-
- Artools is now bundled with GRASP. If you're familiar with the
- previous version of Artools, you'll notice two program changes:
-
- TXTCLP (for converting text-mode images to graphics modes) has been
- added, and TGAPIC/PICTGA are no longer included. The Artools program
- has also been eliminated: each of the programs now has its own
- interactive screen.
-
- TGL +
-
- TGL + is now provided with the GRASP program as an aid to capturing
- and printing images. It also contains other features and is the complete
- program, not just a demo version.
-
- =============================================================================
- Page 3
-
- =============================================================================
-
-
- Updating existing applications
-
- Applications written in GRASP 3.1 and 3.5 will run under version 4.0 with
- four exceptions for those upgrading from 3.1. We're confident that GRASP's
- enhanced capabilities and performance will make converting your applications
- worthwhile.
-
- 1) The TOUCH command has been eliminated. Touchscreen users should rely
- on the software provided with their screens, which can be used to
- simulate keystrokes or mouse clicks in response to touches. GRASP
- programs can then test for keystrokes or mouse clicks instead.
-
- 2) The FLOAT command has been enhanced with ENDFLOAT. Float leaves the
- last clipping displayed in two-page mode, and saves the background
- under that clipping in a buffer. The next Float command restores
- the background from that buffer before starting its Float. This new
- feature allows you to put together a sequence of Floats to create
- complex movement. However, the Endfloat command must now be
- issued after the last Float in a series. Existing applications that
- use Float in two-page animation may need Endfloats to work correctly.
-
- 3) The new math operators include the dash (subtraction and negation).
- Unfortunately, this means that filenames in GRASP programs cannot use
- dashes unless they're enclosed in quotes. For example, PLOAD T-12,1
- will cause an error, but PLOAD "T-12",1 will work. If you've used
- dashes in filenames, add quotes or rename the files.
-
- 4) Since text can now span multiple lines, it's imperative that all
- quotes be balanced. This was not true in version 3.1, you could leave
- off the closing quote from a Text command without causing an error.
- In version 4.0 the interpreter will scan lines, treating them as text,
- until it finds the next quote.
-
- Additional Information and Examples (that may not be in the manual).
- --------------------------------------------------------------------
-
- Section 1: Command Information and Examples
- -------------------------------------------
-
- CALL now supports params so you can call a subroutine with params
- like this:
-
- call subfile display "Hello There" 27 30
-
- ---------
- CGETBUF has been revised, there is a new SET option CGETSHIFT. CGETSHIFT
- defaults to ON, which means that if you do a CGETBUF without shifted
- copies, CGETBUF will round the coordinates to byte boundries and put in
- correct offsets so that the image can be displayed at the same location from
- which it came. If you get an image with shifted copies, this option has no
- effect. If you get an image without shifted copies and this option is OFF,
- and the image is NOT at a byte boundry, the coordinates will not be rounded
- to byte boundries, and the offsets will be correct for saving the image to
- disk. CGETBUF now includes an offset as part of the image rather than an
- offset of 0,0. To set the offset of an image to 0,0 do a POSITION C? 0 0.
-
- =============================================================================
- Page 4
-
- =============================================================================
-
-
- ---------
- The CLEARSCR command now supports an optional color, so you can CLEARSCR 0,
- rather than having to set a drawing color (the new optional parameter has
- no effect on the current drawing color).
-
- ---------
- The new command CURSOR, is mainly for accessing the hardware cursor in text
- modes.
-
- CURSOR ;put up/remove cursor at current location
- CURSOR X,Y ;put up/remove cursor at X,Y
- CURSOR OFF ;remove cursor from screen
-
- example:
- video 1
- getstr 40
- clearscr
- text @0
- waitkey
- exit
-
- getstr:
- set space off
- local savx @textx
- local str ""
- local a ""
- text string(@1," ")
- text @savx,@texty,""
- lp: cursor
- waitkey
- cursor
- getkey a
- if asc(@a)>=32&&len(@str)<@1
- set str @str$@a
- text @a
- goto lp
- else
- if @a==chr(8)&&len(@str)
- set a @textx-width(right(@str,1))
- set str left(@str,len(@str)-1)
- text @a,@texty," "
- text @a,@texty,""
- goto lp
- endif
- if @a!=chr(13)
- goto lp
- endif
- endif
- text @savx,@texty,""
- return @str
-
- =============================================================================
- Page 5
-
-