UniComal on WinNT and Win2000

Developers on Win2000
Unimouse on NT and 2000
File handling problem on NT

This section will be under occasional review as new information becomes available. Please feel free to send questions, comments etc. to support@macharsoft.




Installing Developers' on MS-Windows 2000

The program "install.exe", supplied with UniCOMAL V3.11 Developers', locks-up at an early stage when run from Windows 2000 (Beta Release 2). We are in the process of developing a workaround for this. Meanwhile, we will supply new customers with a pre-installed version on CD if they need to install on Windows 2000. Existing Developers' users experiencing difficulties on upgrading to Windows 2000, should contact support for help.

Students' versions 3.11 and 3.12 don't have this problem, nor does Developers' on WinNT 4.0 - it seems to be Windows 2000 only.







Problems with the Unimouse Module

There are difficulties with the Unimouse module in Text modes on both WinNT 4.0 Service Pack 1 and Win2000 Beta Release 2. When running a program using the Unimouse module in a window in text mode, the mouse doesn't work as expected. Instead, Windows claims the mouse pointer and uses it to highlight a rectangular area of the text window for editing purposes. This contrasts strongly with Win95 and Win98, in which the mouse is available to the COMAL program, but can also be used for editing by first clicking the "Mark" button in the toolbar.

Mouse function can be restored if the COMAL program is run in the foreground by using [ALT]/[ENTER] to switch to full-screen operation, and running a suitable DOS mouse driver such as Microsoft's "MOUSE.COM". This is the only way we have discovered, so far, to get programs written using the Buttons Module to work.

In graphics modes, including graphicscreen(7), the mouse appears to function as expected by COMAL. This means that programs written using the Gadgets Module should run normally.







Windows NT 4.0: File handling problem

The problem:

A Windows NT user in the USA reported (October '98) a problem when reading ASCII files using INPUT FILE. He was attempting to read a text file like this:

   37           - a count of the text lines to follow
   0.0005 U     - each line consists of a decimal
   0.0005 U     - number in ASCII form, a space
   0.0005 U     - and then a letter
   0.02 U
   :
   :
   0.01 U
   0.01 U

using the following code:

   OPEN FILE 1,"a:\in-data.txt",READ
   INPUT FILE 1: n         // Read the count of lines
   FOR i:=1 TO n DO
      INPUT FILE 1: r,f$   // Read each line, number first then letter
      PRINT i;r;f$         // Print a line number, the number data, then the letter
   ENDFOR i
   CLOSE FILE 1

This program runs perfectly on DOS, Windows 3.1 and Windows 95 (we haven't tested it on Windows 98 yet). When it was run from Windows NT 4.0, however, only 34 lines of the file were read instead of 37. The program then stopped, delivering the error message "201: End of file in line ...."

The cause of this problem is not yet clear. However, it seems to have something to do with the operation of the INPUT FILE command under Windows NT 4.0.

A workaround (rather than a solution)

The problem disappears if the program is rewritten, replacing INPUT FILE with the GET$ command. In the following version, GET$ is used to read the characters from the file one at a time. WHILE loops are used, first to read the text characters, appending each in turn to a string variable, then to read and ignore any end-of-line control codes which are present at the end of each text line of the file.

0010 OPEN FILE 1,"A:\in-data.txt",READ
0020 number_of_lines$:=""
0030 character$:=GET$(1,1)         // using GET$ to read a single byte 
0040 WHILE ORD(character$)>31 DO   // up to whatever control code is EOL
0050   number_of_lines$:+character$
0060   character$:=GET$(1,1)
0070 ENDWHILE
0080 number_of_lines#:=VAL(number_of_lines$) 
0090 WHILE ORD(character$)<32 DO character$:=GET$(1,1) // clear any EOL codes
0100 FOR line#:=1 TO number_of_lines# DO
0110   line$:=""
0120   character$:=GET$(1,1)
0130   WHILE ORD(character$)>31 DO
0140     line$:+character$
0150     character$:=GET$(1,1)
0160   ENDWHILE
0170   PRINT line$   // This should include both the number and the letter
0190   IF line#=number_of_lines# THEN EXIT  // Avoids reading EOF
0200   WHILE ORD(character$)<32 DO character$:=GET$(1,1)
0210 ENDFOR line#
0220 CLOSE

We haven't yet (Jan 2000) tested this with Windows2000.



Latest update 29-Jan-2000 (Windows NT)