-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharray.fs
More file actions
43 lines (35 loc) · 897 Bytes
/
array.fs
File metadata and controls
43 lines (35 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\ galope/array.fs
\ This file is part of Galope
\ http://programandala.net/en.program.galope.html
\ Author: Marcos Cruz (programandala.net), 2017.
\ ==============================================================
require ./array-to.fs
: array ( n "name" -- )
create cells allot
does> ( n -- a ) ( n dfa ) array> ;
\ doc{
\
\ array ( n "name" -- )
\
\ Create a 1-dimension single-cell array _name_ with _n_ elements
\ and the execution semantics defined below.
\
\ _name_ execution:
\
\ ----
\ name ( n -- a )
\ ----
\
\ Return address _a_ of element _n_.
\
\ See: `2array`.
\
\ }doc
\ ==============================================================
\ Change log
\ 2017-08-16: Start. Adapt from Solo Forth's `avariable`
\ (http://programandala.net/en.program.solo_forth.html).
\
\ 2017-10-24: Update documentation markup.
\
\ 2018-05-01: Use `array>`.