Wiki
Version 2 (modified by hopscc, 15 years ago)

--

All Cobra Statements

All supported cobra statements (alpha order)

  • break - break out of enclosing loop
  • continue - continue enclosing loop
  • expect - assert receiving an exception
  • lock - lock and execute code in a critical section
  • ignore - remove handlers for event
  • listen - specify handler for event
  • pass - specify non operation
  • post? - do-while equivalent
  • print - output something
  • raise - raise/fire an event
  • return - return from a method
  • throw - generate an exception
  • trace - emit trace/debug info
  • try-catch - try a block and handle any thrown exceptions
  •  while - loop while a condition is true
  • yield - yield a result from a generator