From dae01702eb1a78b1a81c435a3cf55a8d0faeadd7 Mon Sep 17 00:00:00 2001
From: jofret
Date: Fri, 18 Jun 2010 15:42:27 +0000
Subject: Adding function annotations
---
help/en_US/scilab2c_annotations.xml | 2 +-
help/en_US/scilab2c_functions_annotations.xml | 121 ++++++++++++++++++++++++++
2 files changed, 122 insertions(+), 1 deletion(-)
create mode 100644 help/en_US/scilab2c_functions_annotations.xml
(limited to 'help')
diff --git a/help/en_US/scilab2c_annotations.xml b/help/en_US/scilab2c_annotations.xml
index 66db6d88..2e412827 100644
--- a/help/en_US/scilab2c_annotations.xml
+++ b/help/en_US/scilab2c_annotations.xml
@@ -36,7 +36,7 @@
Scilab2C Code Generator,
Data annotations,
- Functions annotations
+ Functions annotations
diff --git a/help/en_US/scilab2c_functions_annotations.xml b/help/en_US/scilab2c_functions_annotations.xml
new file mode 100644
index 00000000..15a4d97a
--- /dev/null
+++ b/help/en_US/scilab2c_functions_annotations.xml
@@ -0,0 +1,121 @@
+
+
+
+
+ $LastChangedDate$
+
+
+
+ Scilab2C Functions Annotations
+
+ Scilab to C Converter : Functions Annotations How To
+
+
+
+ Description
+
+ The annotation of every Scilab function is mandatory. Only the main function of the Scilab program you are translating doesn’t need any annotation.
+
+
+ The main function can not return any output argument and can not accept any input argument.
+
+
+ It is important to specify for each output argument of the Scilab function, its size and type in order to have the possibility to allocate the correct memory space at translation time.
+ When the size of the returned output can be estimated only at run time, as happens for find-like functions that return an output whose size is related to the condition tested by the function,
+ the user must be able to specify at least the maximum size that can be returned by the function.
+ If it is not possible then the function should dynamically allocate memory and so can not be translated by Sci2C.
+
+
+ Function annotation must specify:
+
+ the number of input arguments. (See NIN tag)
+ the number of output arguments. (See NOUT tag)
+ the type and precision of each output argument. (See TP tag)
+ the size of every output argument. (See SZ tag)
+ the default precision for the data declared in the function body.
+
+
+
+
+
+ Simple Example
+
+ This will declare a function with the following informations:
+
+ 1 input argument.
+ 2 output arguments.
+ first output argument has the same type than first input argument.
+ first output argument has the same width than first input argument.
+ first output argument has the same height than first input argument.
+ second output argument has the same type than first input argument.
+ second output argument has the same width than first input argument.
+ second output argument has the same height than first input argument.
+
+
+
+
+ Simple Example
+
+ This will declare a function with the following informations:
+
+ 2 input arguments.
+ 2 output arguments.
+ first output argument has the same type than first input argument.
+ first output argument is a row vetor.
+ first output argument's height is the product of the first input width by height.
+ second output argument has the same type than first input argument.
+ second output argument is a row vector.
+ second output argument's height is the product of the first input width by height.
+
+
+
+ See Also
+
+
+ Sciab2C Annotations,
+ Scilab2C Code Generator
+
+
+
+
+
+
+
+ Authors
+
+ Bruno JOFRET
+ Raffaele NUTRICATO
+
+
+
--
cgit