<%
Dim P, T, totrec
T=4
totrec=request.form("totrec")
for s=0 to 49
U=T+3s
if totrec<U Then
P=s+1
response.write P
end if
next
%>
l'errore sta sulla riga U=T+3s (prevista fine istruzione)
Cosa non va?
grazie, Sabry.
<%
Dim P, T, totrec
T=4
totrec=request.form("totrec")
for s=0 to 49
U=T+3s
if totrec<U Then
P=s+1
response.write P
end if
next
%>
l'errore sta sulla riga U=T+3s (prevista fine istruzione)
Cosa non va?
grazie, Sabry.
...questo codice serve a semplificare questo più lungo che funziona già:
Dim P
If totrec<4 Then
P=1
ElseIf totrec<7 Then
P=2
ElseIf totrec<10 Then
P=3
ElseIf totrec<13 Then
P=4
ElseIf totrec<16 Then
P=5
ElseIf totrec<19 Then
P=6
ElseIf totrec<22 Then
P=7
ElseIf totrec<25 Then
P=8
ElseIf totrec<28 Then
P=9
ElseIf totrec<31 Then
P=10
ElseIf totrec<34 Then
P=11
ElseIf totrec<37 Then
P=12
ElseIf totrec<40 Then
P=13
ElseIf totrec<43 Then
P=14
ElseIf totrec<46 Then
P=15
ElseIf totrec<49 Then
P=16
ElseIf totrec<52 Then
P=17
ElseIf totrec<55 Then
P=18
ElseIf totrec<58 Then
P=19
ElseIf totrec<61 Then
P=20
ElseIf totrec<64 Then
P=21
ElseIf totrec<67 Then
P=22
ElseIf totrec<70 Then
P=23
ElseIf totrec<73 Then
P=24
ElseIf totrec<76 Then
P=25
ElseIf totrec<79 Then
P=26
ElseIf totrec<82 Then
P=27
ElseIf totrec<85 Then
P=28
ElseIf totrec<88 Then
P=29
ElseIf totrec<91 Then
P=30
ElseIf totrec<94 Then
P=31
ElseIf totrec<97 Then
P=32
ElseIf totrec<100 Then
P=33
ElseIf totrec<103 Then
P=34
ElseIf totrec<106 Then
P=35
ElseIf totrec<109 Then
P=36
ElseIf totrec<112 Then
P=37
ElseIf totrec<115 Then
P=38
ElseIf totrec<118 Then
P=39
ElseIf totrec<121 Then
P=40
ElseIf totrec<124 Then
P=41
ElseIf totrec<127 Then
P=42
ElseIf totrec<130 Then
P=43
ElseIf totrec<133 Then
P=44
ElseIf totrec<136 Then
P=45
ElseIf totrec<139 Then
P=46
ElseIf totrec<142 Then
P=47
ElseIf totrec<145 Then
P=48
ElseIf totrec<148 Then
P=49
ElseIf totrec<151 Then
P=50
End If
non lo vedi da solo?che cos'è "3s"?
...3 x s forse devo mettere il segno di moltiplicazione?
l'errore non cè più e adesso per fare stampare a video P
cosa sbaglio? scusate non sono espertissima!
<%
Dim P, T, totrec
T=4
totrec=request.form("totrec")
for s=0 to 49
U=T+3*s
if totrec<U Then
P=s+1
response.write P(s)
end if
next
%>
per stampare P response.write p. perché p(s)?
...non si vede a video P e neanche se scrivo:
response.write "P" stampa la lettera P
boh!
se scrivi
Response.Write "P"
ti scrive
P
è corretto.
prova con
Response.Write "
Ciao a tutti, sono la variabile P...: " & P
...non funge...c'è qualche altro problema,
lo so che se scrivo:
response.write "P" stampa a video P
se scrivo:
response.write P stampa a video il valore di P
però in tutti i casi mi da una pagina bianca,
non esce neanche con la riga che hai detto tu:
Response.Write "
Ciao a tutti, sono la variabile P...: " & P
pagina bianca vuota.
posta tutta la pagina, che le si dà un'occhiata