【问题标题】:C++ to VB.NET Conversion with Residual << and >> Remaining in Math Statements数学语句中剩余 << 和 >> 的 C++ 到 VB.NET 转换
【发布时间】:2025-12-26 10:30:07
【问题描述】:

我将一些 C++ 代码转换为 VB.NET,但是在工作流程中使用了“>>”和“> 并在没有 > 的情况下在 VB.NET 中重写它们:

  For i As UInteger = q + 1 To L
     X(i) = X(i - q) Xor (X(i - q) >> CInt(q))
     For j As UInteger = 1 To q - 1
       X(i) = X(i) Xor (((b >> (q - 1 - j)) And 1) * X(i - j))
     Next j
  Next i

以及

  For i As UInteger = 1 To L 
    X(i) = 1 << (32 - i)
  Next i

在数学上,我不知道 C++ 对 > 所做的事情。

【问题讨论】:

标签: c++ math operators vb.net-2010 logical-operators


【解决方案1】:

它们是位移操作,您可以保留它们。它们在 VB .NET 中是相同的。

http://msdn.microsoft.com/en-us/library/vstudio/2d9yb87a.aspx

【讨论】:

    最近更新 更多