indexed

generates string: prefix000suffix
Author: Johannes Taelman
License: BSD
Github: string/indexed.axo

Inlets

int32 index

Outlets

charptr32 string

Attributes

table prefix

table suffix

Declaration
char c[64];
int offset;
int pval;
Init
strcpy(&c[0], "attr_prefix000attr_suffix");
offset = strlen("attr_prefix");
pval = 0;
Control Rate
if (inlet_index != pval) {
  pval = inlet_index;
  int i = inlet_index;
  int i0 = i / 10;
  c[offset + 2] = '0' + i - 10 * i0;
  i = i0;
  i0 = i / 10;
  c[offset + 1] = '0' + i - 10 * i0;
  i = i0;
  i0 = i / 10;
  c[offset + 0] = '0' + i - 10 * i0;
}
outlet_out = &c[0];

Privacy

© 2024 Zrna Research