summaryrefslogtreecommitdiff
path: root/sci_gateway/cpp/sci_sym_getinfinity.cpp
diff options
context:
space:
mode:
authorHarpreet2015-08-27 02:32:30 +0530
committerHarpreet2015-08-27 02:32:30 +0530
commitf9afc284ce324fa3c13606ad90895beec507c249 (patch)
treea1680fec3342c4eb00b73cd056ff9fad519c5877 /sci_gateway/cpp/sci_sym_getinfinity.cpp
downloadFOSSEE-Optimization-toolbox-f9afc284ce324fa3c13606ad90895beec507c249.tar.gz
FOSSEE-Optimization-toolbox-f9afc284ce324fa3c13606ad90895beec507c249.tar.bz2
FOSSEE-Optimization-toolbox-f9afc284ce324fa3c13606ad90895beec507c249.zip
Master File
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;
+}
+
+}