Escribe Antril, ejecútalo en tu navegador y compártelo con un enlace. Los programas se compilan a WebAssembly y se ejecutan en tu equipo, no en el servidor.
Ejecutar programas no está disponible en este momento: the WebAssembly linker (wasm-ld, part of LLVM) is not installed on this server. Aún puedes escribir, compartir y descargar código.
importSystem;
publicclassVault
{
i32 code = 42; // private: before any labelpublic:
Peek(Vault other) : i32 => other.code;
inherited:
i32Level = 3;
friendly:
i32Shared = 5;
file:
i32Local = 6;
publici32Open = 7; // the word on the member wins
}
publicclassBigVault : Vault
{
public:
Show() : i32 => Level; // inherited: visible here
}
[FriendOf(Vault)]
publicclassAuditor
{
public:
Check(Vault v) : i32 => v.Shared; // friendly: Auditor is a friend
}
Main()
{
Vault v = newVault();
Console.WriteLine(v.Peek(v) + newBigVault().Show() + newAuditor().Check(v) + v.Local + v.Open);
}
Salida
Pulsa Ejecutar (o Ctrl+Enter) para compilar y ejecutar el programa.
Entrada
Lo que lee Console.ReadLine(), una línea a la vez.
Ctrl+Enter ejecuta. Tab agrega sangría (Shift+Tab la quita); pulsa Esc y luego Tab para salir del editor. Un programa puede ejecutarse durante 10 segundos.