I'm trying to port some Java code into Scala:
while ((j=f('blah'))>=0) ...
ERROR:"value >= is not a member of Unit"
Is this not possible?
Assignments return ()
(unit) in Scala. But that's okay because you can put a code block anywhere. You need this instead:
while ({ j=f("blah"); j } >= 0) ...