In particolare non mi è chiaro cosa fa "buffer[pos++] = 2".
Sbaglio o il suo risultato è identico a scrivere "buffer[pos] = 2" ?
Il primo incremento è quindi "finto"?
Con dei convertitori online mi è uscito questo ma mi è ancora meno chiaro:
Codice sorgente - presumibilmente VB.NET |
Const BUFSIZE As Integer = 4 * 1024 Dim buffer As Byte() = New Byte(BUFSIZE) Dim pqueue As String = "test" Dim pos As Integer = 0 buffer(Math.Min(System.Threading.Interlocked.Increment(pos), pos - 1)) = 2 For i As Integer = 0 To pqueue.Length - 1 buffer(Math.Min(System.Threading.Interlocked.Increment(pos), pos - 1)) = CByte(pqueue(i)) Next buffer(Math.Min(System.Threading.Interlocked.Increment(pos), pos - 1)) = CByte(vbLf)
|
Mi aiutate a capirci qualcosa?
Ultima modifica effettuata da dylan666 il 30/06/2023 alle 1:37