variables

Run Settings
LanguageMercury
Language Version
Run Command
:- module main. :- interface. :- import_module io. % Predicado principal :- pred main(io::di, io::uo) is det. % Implementación del módulo :- implementation. :- import_module list. main(!IO) :- % Declaración de variables IntVar = 42, FloatVar = 3.14, StringVar = "Hola, Mercury", ListVar = [1, 2, 3, 4, 5], % Uso de variables y salida io.write_string("Valor de IntVar: ", !IO), io.write_int(IntVar, !IO), io.nl(!IO), io.write_string("Valor de FloatVar: ", !IO), io.write_float(FloatVar, !IO), io.nl(!IO), io.write_string("Valor de StringVar: ", !IO), io.write_string(StringVar, !IO), io.nl(!IO), io.write_string("Valores de ListVar: ", !IO), io.write_list(ListVar, ", ", io.write_int, !IO), io.nl(!IO).
Editor Settings
Theme
Key bindings
Full width
Lines