Re: GoTo in Java



> If you had the "reverse compile to different language" feature, you
> could have the example written once, and then reverse compile it.

The problem with that is that you would never wind up with the example
as 'language x program' but as a 'language y program in x syntax'. The
way the code is best arranged for one language depends on features of
that and 'translation' requires 'complete rewrite'. It would require
that the translator identify idioms.

Cobol:
OPEN INPUT file
IF ( File-Status-1 NOT = "0" )
DISPLAY "Not found"
ELSE
PERFORM UNTIL EoF
READ file
AT END SET EoF
NOT AT END
process
END READ
END-PERORM
CLOSE file
END-IF

C:
if ( file = fopen(filename, "r") )
{
while ( ( recpoint = fgets(record, recmax, file) ) != NULL )
{ process; }
fclose(file);
}
else
puts("Not found");

Python:
try:
file = open(filename, "r")
except:
print "file not found"
else:
for record in file:
process
file.close()

.



Relevant Pages

  • Re: Aspects of programming languages in common
    ... A lot of language suites consist of front ends for C, ... They undergo a syntax evaluation before being ... > My understanding of the proposal is to perform the translation to ... There would then be a consistent base upon which to build the parse tree, ...
    (comp.programming)
  • Re: Another Sterling Massachusetts Alum
    ... They have been trying to develop a translation ... Do you mean LANGUAGE departments? ... departments were both cut and courses. ... Linguistics (as Columbia eliminated the department pretty much in the ...
    (alt.sports.baseball.bos-redsox)
  • ISO 9001 Certified Multilingual Solutions - Translation and Localization of Technical Documentat
    ... DOCUMENTATION AND SOFTWARE LOCALIZATION - TERMINOLOGY DATABASES - ... ALPHATRAD is among the leading suppliers of multilingual translation ... Our translators and interpreters are language graduates, ...
    (freebsd-questions)
  • Re: Documentation of kernel messages (Summary)
    ... somebody's willing to do the translation work, ... documentation and become kernel hacker. ... commented in native language for common problems ... language maintainer for help, or there will be too much for the language ...
    (Linux-Kernel)
  • Re: Godels comments about the "true reason" for incompleteness
    ... where P and Q are arbitrary) into the language ... variables) into a first-order language via translation, ... (e.g via Godel's translation procedure). ... There is no such thing as *a* tautology as far as ...
    (sci.logic)