#include <math.h>#include "stack-c.h"Include dependency graph for ext4c.c:

Go to the source code of this file.
Defines | |
| #define | MAXCH 10 |
Functions | |
| int | ext4c (int *n, double *a, double *b, double *c) |
| #define MAXCH 10 |
Definition at line 18 of file ext4c.c.
References MAXCH, and ReadString.
00019 { 00020 int k; 00021 char ch[MAXCH]; 00022 int lch=MAXCH; 00023 00024 /* We search a Scilab Object name YesOrNo 00025 * check that it is a string 00026 * and store the string in ch 00027 * lch is used on entry to give the maximum number 00028 * of characters which can be stored in ch 00029 * After the call lch contains the number of 00030 * copied characters 00031 */ 00032 00033 ReadString("YesOrNo", &lch, ch); 00034 /******************************/ 00035 if (strcmp(ch, "yes") == 0) 00036 { 00037 for (k = 0; k < *n; ++k) 00038 c[k] = sin(a[k]) + cos(b[k]); 00039 } 00040 else 00041 { 00042 for (k = 0; k < *n; ++k) 00043 c[k] = a[k] + b[k]; 00044 } 00045 return(0); 00046 }
1.5.1