BUG: Sample MTTEST.FOR Compile ErrorsLast reviewed: December 6, 1995Article ID: Q118338 |
The information in this article applies to:
SYMPTOMSWhen you compile the multithread example MTTEST.FOR, the compiler generates the following error messages:
MTTEST.FOR(12) : error F2328: CREATETHREAD : already typed MTTEST.FOR(12) : error F2328: WAITFORMULTIPLEOBJECTS : already typed MTTEST.FOR(19) : error F2611: CREATETHREAD : formal argument THREAD_FUNC : actual not subprogram CAUSEThe sample program contains two errors.
RESOLUTIONThe CreateThread() and WaitForMultipleObjects() declarations are not needed and should be removed. Delete the line 12 from MTTEST.FOR:
integer*4 CreateThread, WaitForMultipleObjectsCreateThread() expects a subprogram, not a location. Remove the syntax "LOC()" from line 19 of MTTEST.FOR:
handle(i) = CreateThread (0, 0, LOC (Task), temp(i), 0, myid)After the correction is made, the line will be as follows:
handle(i) = CreateThread (0, 0, Task, temp(i), 0, myid)In addition to the actual errors, the program takes an unnecessarily long time to run. The number of milliseconds it waits in the "task" routine should be reduced from 10000 to 1000 or less. In MTTEST.FOR, change
call sleepqq(10000*seq) -to- call sleepqq(1000*seq) STATUSMicrosoft has confirmed this to be a bug in the FORTRAN PowerStation 32 for Windows NT, version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional reference words: 1.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |