Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个循环如何在 Xtend 中完成?
for (char character = '\0'; character != PacketConstants.STRING_TERMINATOR; character = (char) buffer.get())
我已阅读文档并尝试了几种不同的方法,但无法使其正常工作。
Xtend中没有for(;;)循环。您应该改用while循环:
for(;;)
while
var char character = 0 as char while (character != PacketConstants.STRING_TERMINATOR) { character = buffer.get() as char }