Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

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():

Code Block
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

Code Block
s = 'This is string'

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