From Wiring

Jump to: navigation, search
Nombre Constant
Descripción Constant es el constructor del tipo de datos Constant para cadenas de caracteres (strings) de solo lectura. Estos tipos de datos no están localizados en memoria RAM lo que permite ahorrar memoria para otros datos que si lo requieran. Use estos tipos de datos para guardar datos que son constantes (datos que van a cambiar durante toda la vida del programa).
ConstantString var = Constant("su string constante");
Constant("otro string constante");
var unknown datatype nombre de la variable que referencia el valor
// ...
  ConstantString big_string = Constant(
  "Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of\n"
    "lather on which a mirror and a razor lay crossed. A yellow dressinggown,\n"
    "ungirdled, was sustained gently behind him on the mild morning air. He\n"
    "held the bowl aloft and intoned:\n"
    "--_Introibo ad altare Dei_.\n"
    "Halted, he peered down the dark winding stairs and called out coarsely:\n"
    "--Come up, Kinch! Come up, you fearful jesuit!\n"
    "Solemnly he came forward and mounted the round gunrest. He faced about\n"
    "and blessed gravely thrice the tower, the surrounding land and the\n"
    "awaking mountains. Then, catching sight of Stephen Dedalus, he bent\n"
    "towards him and made rapid crosses in the air, gurgling in his throat\n"
    "and shaking his head. Stephen Dedalus, displeased and sleepy, leaned\n"
    "his arms on the top of the staircase and looked coldly at the shaking\n"
    "gurgling face that blessed him, equine in its length, and at the light\n"
    "untonsured hair, grained and hued like pale oak.\n");
  Serial.println(Constant("The big string is, quote:"));
// ...
Relacionados ConstantString, ByteTable, CharTable, UCharTable, IntTable, UIntTable, LongTable, ULongTable, FloatTable, DoubleTable
Idioma: English  • Español
Personal tools