Compiled /FPa, NOW# Gives Incorrect Results After First Call (72421)



The information in this article applies to:

  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0

This article was previously published under Q72421

SYMPTOMS

When using the NOW# function (which returns a serialized current date and time representation) with alternate math (BC /FPa), NOW# may work erratically or fail entirely after the first call.

STATUS

Microsoft has confirmed this to be a bug with the Date/Time add-on library included with Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2, versions 7.0 and 7.1. This problem was corrected in Microsoft Visual Basic version 1.0 for MS-DOS.

MORE INFORMATION

The following program demonstrates this problem. The first line displayed on the screen uses the NOW# function and is not updated correctly. The second line uses the TIME$ function and shows the correct time.

Code Sample: NOW.BAS

Compile this example as follows: BC /FPa /O now.bas ; Link this example as follows: LINK now,,,DTFMTAR.LIB ;
'$INCLUDE: 'datim.bi'
CLS
PRINT "Press 'q' to quit"
WHILE INKEY$ <> "q"
   LOCATE 1, 1: PRINT Now#
   LOCATE 2, 1: PRINT TIME$
WEND
				

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:KB72421