Forum Discussion

jbrave's avatar
jbrave
Channel Surfer
15 years ago

Converting Java App to Brightscript

first question:

Does this:

Somekindathing() {

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

translate to

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

?

2 Replies

  • 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
  • jbrave's avatar
    jbrave
    Channel Surfer
    Thanks! I'm sure I'll have some more questions later, hope you don't mind.

    - Joel