::SHE+ILA:: Example Code [$49]

Stylish Woman with Purple Hair in Elegant Setting
17
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    DaVinci2
  • Access
    Public
  • Created
    1h ago
  • Try

More about ::SHE+ILA:: Example Code [$49]

// Declare the GHOST;
£::DEMO:: // this segment;
£::MATHS:: // for sqrt();
£::UTILS:: // for sayget();
// There's no need to write "::MATHS::sqrt" or "::UTILS::sayget";
// because the system automatically searches the GHOST segments' symbol tables;
formula <:: &{ (a=%!1, b=%!2, c=%!3, x, y); // Declares the locals and unpacks the parameters;
x<:: (0 - b + sqrt (b ^ 2 - 4 * a * c)) $/ (2 * a);
y <:: (0 - b - sqrt (b ^ 2 - 4 * a * c)) $/ (2 * a);
( x , y ); // Return a vector of two values; }
main <:: &{ (a, b, c, result); // Declare the locals;
sayget ("What is the coefficient of x squared?", &a);
sayget ("What is the coefficient of x?", &b);
sayget ("What is the additive constant?", &c);
ttyout ("The results are ", formula (a, b, c), "displayed as a two element vector", CRLF); }

Comments


Loading Dream Comments...

Discover more dreams from this artist