Well, for the heck of it you could copy and paste the code and watch 1000's of errors appear LOL
Actually no, well I'm not quite sure of your circumstances, but the above is why porting and adapting is such a pain. In a perfect world, we could set our requirements, then design, then write code, then debug...
Seems like in the real workplace that process sometimes gets reversed, suddenly you find out that you need to write in a different language or for a different platform.
If at all possible, figure out what your requirements are first and then code your program in the language you intend to finish in.