Integrate.c 876 B

12345678910111213141516171819202122232425262728293031
  1. // Integrate the argument with respect to x and display it
  2. #define USE_TI89 // Compile for TI-89
  3. #define USE_TI92PLUS // Compile for TI-92 Plus
  4. #define USE_V200 // Compile for V200
  5. #define OPTIMIZE_ROM_CALLS // Use ROM Call Optimization
  6. #define MIN_AMS 101 // Compile for AMS 1.00 or higher
  7. #define SAVE_SCREEN // Save/Restore LCD Contents
  8. #include <tigcclib.h> // Include All Header Files
  9. // Main Function
  10. void _main(void)
  11. {
  12. ESI argptr = top_estack;
  13. HANDLE h;
  14. clrscr ();
  15. TRY
  16. push_END_TAG ();
  17. push_quantum (VAR_X_TAG);
  18. push_expr_quantum (argptr, INTEGRATE_TAG);
  19. NG_rationalESI (top_estack);
  20. h = display_statements (top_estack, 1, FALSE);
  21. printf ("The integral is: %s", (const char*) (HeapDeref (h)));
  22. HeapFree (h);
  23. ONERR
  24. printf ("Error!");
  25. ENDTRY
  26. ngetchx();
  27. }