Public Class Form1 Dim sr As System.IO.StreamReader Dim sw As System.IO.StreamWriter Dim ss As String Dim data()() As String
Private Sub Form1_Load(略) dim i as integer
Try sr = New System.IO.StreamReader("data.txt", System.Text.Encoding.GetEncoding("Shift_JIS")) Do While sr.Peek <> -1 ss = sr.ReadLine() data(i) = ss.Split(",") TextBox5.AppendText(ss & vbCrLf) i = i + 1 Loop Catch ex As Exception MsgBox(ex.Message) End Try
>>268 ECMA-262 3rd editionの9.3.1 ToNumber Applied to the String Typeによれば、 > A StringNumericLiteral that is empty or contains only white space is converted to +0. というわけで正しい挙動
SDLの関数SDL_LockSurfaceの説明に、 No operating system or library calls should be made between lock/unlock pairs, as critical system locks may be held during this time. (この時間の間にクリティカルなシステムロックが行われることがあるため、 ロック/アンロック間では、 いかなる OS システムコールやライブラリコールも 呼ばれるべきではありません。) ってあるんだけど、クリティカルなシステムロックってなんぞや。
バイブル的なものを求めてるなら、D.E.KnuthのThe Art of Computer Programming。 一冊手元に置いておけば、アルゴリズム関連で困ることはまず無い。 でも、数学的なバックグラウンドが無いと読むのは厳しいと思う。 訳書もあるから、本格的にやりたいなら一回は読んでおくべき。
int x = (int)this.Left; int y = (int)this.Top; double Left = System.Windows.Forms.Screen.FromPoint(new System.Drawing.Point(x, y)).Bounds.X; double Top = System.Windows.Forms.Screen.FromPoint(new System.Drawing.Point(x, y)).Bounds.Y; MessageBox.Show(Left.ToString() + "," + Top.ToString());