Tips for DOS MacAnova Users

The most popular version of MacAnova for Windows/DOS computers is MacAnova for Windows. It uses full memory on your machine and has a nice user interface.

For those who either work at the command line or want to run non-interactively, there is a 32-bit DOS version (sometimes called the DJ version). The extended memory (DJ) version

The DOS version can be run interactively by typing commands at a prompt, or can be run non-interactively by redirecting input and output at the DOS prompt. See Appendix C of the Users' Guide for more information.

Line length

The DOS version has some problems with input lines that are longer than the width of the screen. One common situation when you can run up against this is when you are inputting a lot of data using vector().

Although there is no limitation on line length, when the line exceeds the length of the screen, it shifts left instead of ``wrapping'', so you can't see everything you typed. In addition, long lines are harder to edit using the arrow keys.

The workaround to avoid long lines is to use a backslash followed by Enter to extend the command before you reach the right side of the screen. MacAnova will get all your typing and it will all be visible. For example:

Cmd> heads <- vector(104,114,90,140,134,130,144,174,\
   146,142,152,156,147,160,160,163,131,148,154,163)

This workaround works in all versions of MacAnova, including the Windows version.

Saving your output

In the Windows version of MacAnova, everything you type and everything printed goes in an editable command/output window. You can save this window using Save or Save As on the File menu. When you quit you are asked if you want to save any command/output windows.

The DOS version does not write to a window that can be saved. You can still save a record of your session on a file using the spool() command. spool() works like a tape recorder. When you start "spooling", everything you type or MacAnova prints is also saved in a file. When you turn spooling off, nothing more gets saved. Unfortunately you can't save things retroactively; spooling must already be on for printing to be saved.

You start spooling by typing spool(Filename), and turn it off with another spool() command with no file name. Filename is usually the quoted name of the file where you want things save, for example, spool("OUTPUT.TXT"). It can also be a MacAnova CHARACTER variable.

See page 23 of the Introduction document or type help(spool) for more information. spool() works on all versions of MacAnova.

File names and slashes forward and backward

MacAnova uses the backslash character \ inside quotes to flag special characters that may not have their usual meaning. This is called ``escaping'' the character. Here are examples showing how to put quotation markes inside a CHARACTER variables:

Cmd> print("String without quotes") # no quotes printed
String without quotes

Cmd> print("\"String with quotes\"") # escaped " printed 
"String with quotes"

There are several other useful escaped characters including \t (tab character), \n (newline character), \\ (backslash itself).

When you give an explicit file name to an input or output command, MacAnova first tries to open it in the current directory, and then tries to open it in the directories in MacAnova CHARACTER vector DATAPATHS. On Windows, DATAPATHS is initialized to contain INSTALL\SharedSupport and HOME\MyMacAnovaFiles, where INSTALL is the directory in which MacAnova is located, and HOME is the user's home directory (typically C:\Documents and Settings\username).

Because DOS MacAnova does not have dialog boxes, when you need to access a file that is not in the current directory or in one of the directories in DATAPATHS, you need to use file name that is a "path", a name combining directory information with the file name. But DOS uses the backslash to separate file and directory names in a path. Because the backslash has special significance to MacAnova, there is a potential problem. There are two ways to deal with it.

Running DOS commands in MacAnova

You may execute a DOS command from within MacAnova by

Cmd> shell(doscmd)

where doscmd is a quoted string or CHARACTER variable. For example, to you can use the DIR command to see what is in a directory as in shell("DIR C:\\Homeword\\*.mac"). You have to use escaped back slashes in such commads. In principle you can do about anything this way, but in practice, in the limited memory version you are limited to executing DOS commands that require very little memory.

At present this doesn't seem to work well in the Windows version. Type help(shell) for more information.

Saving graphics

You can save graphics easily under Windows, but it is rather difficult under DOS. If you want to do graphics, I'd suggest using the Windows version. If you really want to do graphics using the DOS version, here are some tips.

In any version, you may use ``dumb'' plots. These are low resolution plots consisting entirely of ordinary characters. With enough patience, you could create them on a typewriter. You get them by using dumb:T as a keyword phrase in your plotting command:

Cmd> plot(x,y,dumb:T,xlab:"Concentration", ylab:"Strength")

The plot is printed in the screen just like regular MacAnova output and can be saved using the spool() command.

When running DOS MacAnova under Windows, you can copy a high resolution graph to the Clipboard by pressing ALT+PrintScreen while the MacAnova plot is on the screen. You then should paste the Clipboard into Paintbrush or WordPerfect or some other program that will print the image. You may wish to reverse the colors so that the plot is black on white instead of white on black. How you do this depends on the program you paste the plot into.

When running the extended memory version under DOS, you may copy a graph into a file by using screendump:filename as a keyword phrase in your plotting command:

Cmd> plot(x,y,screendump:"plot1.pcx")
or
Cmd> showplot(screendump:"plot2.pcx")

These save the graphics screen in PCX format. Many programs (including Paintbrush, Microsoft Word and WordPerfect) can import PCX format files into documents



Last updated Wed Aug 17 16:50:36 CDT 2005