Converting Java App to Brightscript

first question:

Does this:

Somekindathing() {

a = something();
b = somethingelse();
}

translate to

somekindathing={
a:something()
b:somethingelse()
}

?

Short answer, no.

Your first code snippet is a Java function definition, the second is a BrightScript roAssociativeArray definition. In Java, braces are used to define code blocks, which is not true in BrightScript. In BrightScript, braces denote a roAssociativeArray. The Java code would translate to BrightScript as something like this…

sub Somekindathing()
  a = something()
  b = somethingelse()
end sub

Thanks! I’m sure I’ll have some more questions later, hope you don’t mind.

  • Joel