next up previous contents index
Next: GILDAS Images Up: Variables and Expressions Previous: Conditional Assignment   Contents   Index

Size casting

Typing the explicit dimensions when declaring a new variable may be tedious. SIC allows to create arrays of dimensions identical to those of existing variables through the /LIKE option. For example, if A is an existing integer variable of dimensions 10,5,30 the following command

      DEFINE REAL B C D /LIKE A
is equivalent to
      DEFINE REAL B[10,5,30] C[10,5,30] D[10,5,30]
and defines three real arrays of dimension [10,5,30]. This feature, called size casting, is specially convenient to declare arrays that match images (see below).



Gildas manager 2024-03-28