Last change
on this file since 1114 was
1114,
checked in by luba, 17 years ago
|
- type_short_int is replaced by type_int32
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
503 bytes
|
Line | |
---|
1 | #include <rf_core.hh> |
---|
2 | #include <rf_types.hh> |
---|
3 | |
---|
4 | using namespace rfrt; |
---|
5 | |
---|
6 | namespace refal |
---|
7 | { |
---|
8 | |
---|
9 | namespace Vector |
---|
10 | { |
---|
11 | |
---|
12 | RF_DECL(Vector_m_Length); |
---|
13 | |
---|
14 | RF_FUNC (Vector_m_Length, (RF_ARG _vector), (RF_RES _len)) |
---|
15 | |
---|
16 | if (_vector.get_len() == 1) { |
---|
17 | Term* p_vector = _vector.get_first(); |
---|
18 | rftype::Vector* v = p_vector->cast_to<rftype::Vector>(type_vector); |
---|
19 | if (!v) |
---|
20 | RF_LIB_ERROR("Invalid argument"); |
---|
21 | _len = Int32::create_expr(v->get_length()); |
---|
22 | } else |
---|
23 | RF_LIB_ERROR("Invalid argument"); |
---|
24 | |
---|
25 | RF_END |
---|
26 | |
---|
27 | } |
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.