From b22f596ce449869bffd8e0f63baee1c53e20fa06 Mon Sep 17 00:00:00 2001
From: jofret
Date: Tue, 28 Apr 2009 07:11:01 +0000
Subject: Moving macros here

---
 macros/FunctionAnnotation/FA_MUL.sci | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 macros/FunctionAnnotation/FA_MUL.sci

(limited to 'macros/FunctionAnnotation/FA_MUL.sci')

diff --git a/macros/FunctionAnnotation/FA_MUL.sci b/macros/FunctionAnnotation/FA_MUL.sci
new file mode 100644
index 00000000..d3495a02
--- /dev/null
+++ b/macros/FunctionAnnotation/FA_MUL.sci
@@ -0,0 +1,42 @@
+function opout = FA_MUL(in1,in2)
+// function opout = FA_MUL(in1,in2)
+// -----------------------------------------------------------------
+// Multiplication function for Function Annotations.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+// 26-Oct-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (SCI2Cisnum(in1) & SCI2Cisnum(in2))
+   in1num = eval(in1);
+   in2num = eval(in2);
+   outnum = in1num*in2num;
+   if isnan(outnum)
+      opout  = '__SCI2CNANSIZE';
+   else
+      opout  = string(outnum);
+   end
+else
+   opout  = '('+string(in1)+'*'+string(in2)+')';
+end   
+endfunction
-- 
cgit