Diskuze: VBNET-čtení dat po dávkách
V předchozím kvízu, Test znalostí C# .NET online, jsme si ověřili nabyté zkušenosti z kurzu.
Zobrazeno 2 zpráv z 2.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
V předchozím kvízu, Test znalostí C# .NET online, jsme si ověřili nabyté zkušenosti z kurzu.
Takto vypadá blok čtení dat
' U Z L Y
For y9 = 1 To I(5) 'počet uzlů
Using sr As New StreamReader("c:\temp\wworkj7.txt")
While Not sr.EndOfStream
Dim j4 As Double = CDbl(sr.ReadLine())
For ii = 1 To 5
Dim ss As Double = CDbl(sr.ReadLine())
S(ii, 1) = ss
Console.Write(" j4=" & j4 & ".")
Console.Write(" S(" & ii & ",1)=")
Console.Write(S(ii, 1))
Next ii
Console.WriteLine()
For ii = 1 To 4
Dim ss As Double = CDbl(sr.ReadLine())
RA(ii) = ss
' Console.WriteLine(" RA(" & ii & ")=" & RA(ii) & ".")
Next ii
If j4 = 0 Then
GoTo STR2120
End If
For y7 = 1 To 5
S(y7, 1) = S(y7, 1) / j4
Next y7
If y9 = 1 Then a3960() ' vnitř.síly v uzlech
r9 = r9 + 1
p1 = S(3, 1) : p22 = S(1, 1) : ffnsa() : c6 = ffns
p1 = S(3, 1) : p22 = S(2, 1) : ffnsa() : c7 = ffns
RA(3) = RA(3) / q
RA(2) = -RA(2) + RA(3) * p
' Console.WriteLine()
' Console.WriteLine(" " & retp)
Console.Write(" " & y9)
Console.Write(" " & S(2, 1) / 10000)
Console.Write(" " & S(1, 1) / 100)
Console.Write(" " & S(3, 1) / 100)
Console.Write(" " & S(4, 1) / 10000)
Console.Write(" " & S(5, 1) / 100)
Console.Write(" " & c7 / 10000)
Console.Write(" " & c6 / 100)
a42()
Console.WriteLine()
Console.WriteLine(" Vnější síly:zatížení uzlu:")
Console.WriteLine(" svislá síla.........mMx..........mMy")
Console.Write(" " & RA(1) / 1000)
Console.Write(" " & RA(3) / 10000)
Console.Write(" " & RA(2) / 1000000)
Console.WriteLine()
a42()
If xx = 0 Then
GoTo STR2110
End If
' Console.WriteLine("y9= " & y9 & ".")
' Console.WriteLine("S(i,1)= " & S(1, 1) & "," & S(2, 1) & "," & S(3, 1) & "," & S(4, 1) & "," & S(5, 1) & "," & c6 & "," & c7 & ".")
' Console.WriteLine(reta)
' Console.WriteLine("RA(1,3,2)= " & RA(1) & "," & RA(3) & "," & RA(2) & ".")
End While
End Using
STR2110: Using sw As New StreamWriter("c:\temp\vysl.txt", True) 'zápis Tx,Ty,Mx,My v uzlech
sw.WriteLine(y9) 'č.uzlu
sw.WriteLine(S(4, 1)) 'Tx
sw.WriteLine(S(5, 1)) 'Ty
sw.WriteLine(c6) 'My
sw.WriteLine(c7) 'Mx
' Console.WriteLine(" y9=" & y9 & " S(4,1)=" & S(4, 1) & " S(5,1)=" & S(5, 1) & " c6=" & c6 & " c7=" & c7 & ".")
End Using
STR2120: Next y9 'další uzel
Console.ReadKey()
code]
Zobrazeno 2 zpráv z 2.