BellaDati doesn't support the usual while {...} and for {...} loops like Java. Instead of this, you can use closures in place of most for loops using each():

def stringList = [ "java", "perl", "python", "ruby", "c#", "cobol",
                   "groovy", "jython", "smalltalk", "prolog", "m", "yacc" ];

a = 'values: '
stringList.each() { values += it };
return a

Looping over splitted string

s = 'This is string'

a = 'values: '
split(s, '').each() { values += it };
return a
  • No labels