Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shared public define Run(...) {...}
- shared public Bit Run(...) {...}
- shared public Bit* Run(...) {...}
- shared public getter Bit Run(...) {...}
- shared public getter Bit* Run(...) {...}
- shared public Function Run(...) = {...};
- shared public Function<Bit> Run(...) = {...};
- shared public Function<Bit*> Run(...) = {...};
- shared public Bit(false) bit;
- shared public Bit* bitPointer = ref bit;
- uniform public Bit(false) bit;
- uniform public Bit* bitPointer = ref bit;
- public interface Textable {
- public Text ToText();
- }
- public module Vector implements Textable {
- public Numeric(0.0) X;
- public Numeric(0.0) Y;
- public construct(x: readonly Numeric*, y: readonly Numeric*) {
- X = val(x);
- Y = val(y);
- }
- ToText() = {
- pass "X: " + X.ToText() + ", Y: " + Y.ToText();
- }
- }
- shared public define Entry() {
- Vector(2.4, 8.7) vector;
- Terminal.Log(ref vector);
- }
- // gets compiled to main.cpp:
- #include <iostream>
- #include <string>
- #include <vector>
- #include <functional>
- public static void Run(...) {...}
- public static bool Run(...) {...}
- public static bool* Run(...) {...}
- public static bool Run(...) const {...}
- public static bool* Run(...) const {...}
- public static std::function<void(...)> Run = [](...) {...};
- public static std::function<bool(...)> Run = [](...) {...};
- public static std::function<bool*(...)> Run = [](...) {...};
- public static bool bit = false;
- public static bool* bitPointer = &bit;
- public const bool bit = false;
- public const bool* const bitPointer = &bit;
- public class Textable {
- public:
- virtual std::string ToText();
- }
- public class Vector : public Textable {
- public:
- float X = 0.0f;
- float Y = 0.0f;
- Vector(const float* x, const float* y) {
- X = *x;
- Y = *y;
- }
- std::string ToText() {
- return "X: " + std::to_string(X) + ", Y: " + std::to_string(Y);
- }
- }
- int main()
- {
- Vector vector(2.4f, 8.7f);
- std::cout << vector.ToText() << std::endl;
- }
Add Comment
Please, Sign In to add comment