- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Code:
program main
integer*4 :: jnum(10)
integer*4 :: i
integer*4 :: j
integer*4 :: k
do i=1,10
jnum(i) = i
enddo
j = 8
k = maxval(minloc(jnum, MASK=jnum.eq.j))
write(*,*) "k =", k
endProduces four messages :
Run-Time Check Failure #3 - The variable '' is being used without being defined.
I know I can just do
k=maxval(jnum, MASK=jnum.eq.j)
but I waslooking at acode snippet of an algorithmand came across this in the process.
Can anyone explain what's wrong with the code as shown?
thanks
Les
Link kopiert
1 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
You didn't mention that you are using /check:uninit
You've encountered two compiler bugs:
1. The variable name does not get properly reported
2. This code should not have reported an error at all
Both will be fixed as of the mid-late February update. This update will also make /check:uninit work in contexts other than running under the VS debugger.
You've encountered two compiler bugs:
1. The variable name does not get properly reported
2. This code should not have reported an error at all
Both will be fixed as of the mid-late February update. This update will also make /check:uninit work in contexts other than running under the VS debugger.
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite