Pretty Print.c 753 B

123456789101112131415161718192021222324252627
  1. // Calculate an integral and pretty print 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 MIN_AMS 101 // Compile for AMS 1.01 or higher
  6. #define SAVE_SCREEN // Save/Restore LCD Contents
  7. #include <tigcclib.h> // Include All Header Files
  8. // Main Function
  9. void _main(void)
  10. {
  11. TRY
  12. push_END_TAG ();
  13. push_quantum (VAR_X_TAG);
  14. push_parse_text ("1/((x-3)(x^2+4))");
  15. push_quantum (INTEGRATE_TAG);
  16. NG_rationalESI (top_estack);
  17. WinClr (DeskTop);
  18. Print2DExpr (Parse2DExpr (top_estack, FALSE), DeskTop, 0, 50);
  19. ONERR
  20. DrawStr (20, 20, "Error!", A_NORMAL);
  21. ENDTRY
  22. ngetchx ();
  23. }