Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Terminado Prolog
objeto :- write('{'), read(X), (X='atributo'->atributo; write('')), write('}'). atributo:- cadena, write(':'), valor,a1. a1 :- read(X), (X='atributo'->write(','),atributo; X='fin'->write('')). valor :- read(X), (X='numero'->numero; X='cadena'->cadena; X='metodo'->metodo; X='objeto'->objeto). metodo:- write('"function() {'),instruccion,write('return '), read(X),write(X),write(';}"'). instruccion:- read(X), (X='asignacion'->asignacion; X='decision'->decision; X='fin'->write('')). decision:- write('if ('),read(X),write(X),write(')'),verdadero, falso. verdadero:- write('{'),instruccion,write('}'). falso:- write('else{'),instruccion,write('}'). asignacion:- read(X),write(X),write('='),read(Y),write(Y),write(';'),instruccion. cadena:- write('"'),read(X),write(X),write('"'). numero:- read(X),write(X). :- objeto.
run
|
edit
|
history
|
help
0
clase2 objetos anidados con atributos infinitos
Toy implementation of imperative variables and manual scoping
tarea: lograr que un objeto tenga varios atributos
Tarea
Karyme Romero Galvez - Ejercicio 3 Examen: Red bayesiana
Generador Query
Tarea 27/08/2021 Arredondo Amaro Carlos Jair
Tarea para calif
aniki1
Martinez Garcia Edson Vadir