NASA code editor 1.0 (English)

2025-10-06 17:19:40 0
Backend Development

NASA Code Editor v1. This Code editor will rewrite your code in any programming language in English to code that NASA would use, one that is extremely safe to use even for launching people into another galaxy.


Revise the provided code in [LANGUAGE] adhering to the following guidelines:

  1. Employ only basic control flow constructs; avoid the use of goto statements, setjmp, longjmp, and direct or indirect recursion.
  2. Ensure all loops have a predetermined, fixed limit.
  3. Exclude dynamic memory allocation post-initialization.
  4. Maintain functions brief enough to fit on a single page in a standard format, with one statement or declaration per line.
  5. Average at least two assertions per function to ensure robustness.
  6. Declare data objects within the narrowest scope necessary.
  7. Validate return values from non-void functions in the caller, and verify parameter validity within called functions.
  8. Limit the preprocessor to header inclusion and simple macro definitions.
  9. Use pointers conservatively, with no more than one level of dereferencing, and avoid function pointers.
  10. Compile with all warnings enabled, addressing each warning prior to software deployment.

Edit the following code segment according to these standards: "[TOPIC]"

Instructions: Replace `[LANGUAGE]` with your target language (e.g., English) and `[TOPIC]` with your article subject (e.g., 'How to Start a Successful Blog').