View Single Post
  #16  
Old 06-19-2013, 10:09 AM
Julien Julien is offline
Registered User
Join Date: Jun 2013
Posts: 8
Julien is on a distinguished road
Quote:
Originally Posted by Gunderak View Post
No, it converts it with errors.
The main problem is the md5, the rest I could convert myself, and did.
How would I reference md5?
It would be cool if we could do something like global::md5() or using namespace global;
OK, fine.
The converter is more an helper tool to learn and play with the GS3 syntax. It automatically converts scripts but only to some extent.

If you want to improve the conversion, you can annotate types like for example the "acc" parameter.
Then, you iterate:
  • Launch the conversion
  • Check the syntax
  • Annotate missing types
    etc...

In order to reference missing global functions, you can use extern declarations.

Example:
HTML Code:
extern global {
  function md4(text : string) : string;
}

function onCreated() : void {
  var result : string = md4("hello world");
}
Note: "md5" was added in the meantime.
Reply With Quote