version 1.4, 2000/05/29 08:54:44 |
version 1.5, 2000/06/05 02:26:47 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/builtin/array.c,v 1.3 2000/04/20 02:20:15 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/builtin/array.c,v 1.4 2000/05/29 08:54:44 noro Exp $ */ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
#include "parse.h" |
#include "parse.h" |
|
|
|
|
asir_assert(ARG0(arg),O_N,"newvect"); |
asir_assert(ARG0(arg),O_N,"newvect"); |
len = QTOS((Q)ARG0(arg)); |
len = QTOS((Q)ARG0(arg)); |
if ( len <= 0 ) |
if ( len < 0 ) |
error("newvect : invalid size"); |
error("newvect : invalid size"); |
MKVECT(vect,len); |
MKVECT(vect,len); |
if ( argc(arg) == 2 ) { |
if ( argc(arg) == 2 ) { |
|
|
asir_assert(ARG0(arg),O_N,"newmat"); |
asir_assert(ARG0(arg),O_N,"newmat"); |
asir_assert(ARG1(arg),O_N,"newmat"); |
asir_assert(ARG1(arg),O_N,"newmat"); |
row = QTOS((Q)ARG0(arg)); col = QTOS((Q)ARG1(arg)); |
row = QTOS((Q)ARG0(arg)); col = QTOS((Q)ARG1(arg)); |
if ( row <= 0 || col <= 0 ) |
if ( row < 0 || col < 0 ) |
error("newmat : invalid size"); |
error("newmat : invalid size"); |
MKMAT(m,row,col); |
MKMAT(m,row,col); |
if ( argc(arg) == 3 ) { |
if ( argc(arg) == 3 ) { |