Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
método isan
objeto :- write('{'),aux1, write('}'). aux1 :- read(X),(X='atributo'->atributo; X='fin'->write('')). atributo :-cadena, write(':'),valor,aux2. arreglo :- write('['),aux3, write(']'). aux2 :- read(X),(X='atributo'->write(','),atributo; X='fin'->write('')). aux3 :- read(X),(X='valor'->valor,aux4; X='fin'->write('')). aux4 :- read(X),(X='valor'->write(','),valor,aux4; X='fin'->write('')). cadena :- read(X),write('"'),write(X),write('"'). numero :- read(X),write(X). metodo :- write('"function() {'),instruccion,write(' return isan}"'). asignacion :- read(X),write(X),write('='), read(Y),write(Y),write(';'). decision :- write('if('),read(C),write(C),write(') {'),instruccion,write('}'). sino :- write(' else{'),instruccion,write('}'). sinosi :- write(' else '),decision. instruccion :- read(I),(I='asignacion'->asignacion,instruccion; I='decision'->decision,instruccion; I='sino'->sino,instruccion; I='sinosi'->sinosi,instruccion; I='fin'->write('')). valor :-read(T),(T='cadena'->cadena; T='numero'->numero; T='arreglo'->arreglo; T='metodo'->metodo; T='objeto'->objeto). :- objeto.
run
|
edit
|
history
|
help
0
isan
Clase 19/5-1
atribinfintit
aaa
Super QUERYS Alonso ordoñez Soto con atributos
ObjetosyArreglos_4CM70_RosanoVargasIvan
JSON con asignaciones y decisiones dentro de una función
Tarea1-2
task8
Arreglos_GarciaFernandezLuis