将 JavaScript 函数转换为 VB6

编程


你好,请问如何将这个 javascript 函数转换为 vb6 函数?

JavaScript
function TParams () {
        this.length = 4;
        this.Rut    =  "";
   this.Perfil     = "";
   this.erc = 0;
   this.ercdesc="";
   }

[Spanish translated and removed]

解决方案4

GenerateUniqueIdWithAlphanumeric: async () => {
// 返回 Math.random().toString(36).slice(2) + randomBytes(1).toString(‘hex’) + new Date().getTime();
让nodeId = Math.floor(Math.random() * (100000 – 10)) + 100000;
让序列= 0;
让最后时间戳= 0;

让时间戳 = new Date().getTime();

if (时间戳 === 最后时间戳) {
序列++;
} 别的 {
序列=0;
最后时间戳=时间戳;
}

// 结合时间戳、节点ID和序列号生成唯一ID
让 uniqueId = timestamp.toString(32) + nodeId.toString(32) +equence.toString(32);

返回唯一ID
}

解决方案1

请用英文发布……更多的人将能够阅读(并因此回答)您的问题。

コメント

タイトルとURLをコピーしました