Wiki

Ticket #315 (assigned enhancement)

Opened 12 years ago

Last modified 12 years ago

cobra support multiple return values

Reported by: hopscc Owned by: Chuck
Priority: minor Milestone:
Component: Cobra Compiler Version: 0.9.3
Keywords: Cc:

Description

(Feature placeholder)

Multiple return values on methods using simple and obvious syntax (slight extension to existing) for method return type declaration and return values.

a,b = .fn(123, 'xyz')
assert a.typeOf == int
assert b.typeOf == String

def fn(i as int, s as String) as int, String
     # lotta calc
     return i, s

See  forum Topic Multiple Return values

Attachments

multiReturn.patch Download (25.5 KB) - added by hopscc 12 years ago.

Change History

Changed 12 years ago by hopscc

Changed 12 years ago by hopscc

  • owner set to Chuck
  • status changed from new to assigned

implementation patch and tests.
Includes new typed element container - Bag (up to 4 elements).

Note: See TracTickets for help on using tickets.