summaryrefslogtreecommitdiff
path: root/sci_gateway/cpp/sci_sym_getinfinity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sci_gateway/cpp/sci_sym_getinfinity.cpp')
-rw-r--r--sci_gateway/cpp/sci_sym_getinfinity.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/sci_gateway/cpp/sci_sym_getinfinity.cpp b/sci_gateway/cpp/sci_sym_getinfinity.cpp
new file mode 100644
index 0000000..c7fe243
--- /dev/null
+++ b/sci_gateway/cpp/sci_sym_getinfinity.cpp
@@ -0,0 +1,35 @@
+/*
+ * Symphony Toolbox
+ * Provides the Symphony infinity value
+ * By Keyur Joshi
+ */
+#include "symphony.h"
+#include "sci_iofunc.hpp"
+
+extern sym_environment* global_sym_env; //defined in globals.cpp
+
+extern "C" {
+#include "api_scilab.h"
+#include "Scierror.h"
+#include "sciprint.h"
+#include "BOOL.h"
+#include <localization.h>
+
+int sci_sym_getInfinity(char *fname){
+
+ //error management variable
+ SciErr sciErr;
+ int iRet;
+
+ //code to check arguments and get them
+ CheckInputArgument(pvApiCtx,0,0) ;
+ CheckOutputArgument(pvApiCtx,1,1) ;
+
+ //code to give output
+ if(returnDoubleToScilab(sym_get_infinity()))
+ return 1;
+
+ return 0;
+}
+
+}