Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Codificacion de mercado
objeto :- write('{'),aux1, write('}'). aux1 :- read(X),(X='atributo'->atributo; X='fin'->write('')). atributo :- read(X),write('"'),write(X),write('"'), write(':'),valoratributo(X),aux2. arreglo :- write('['),aux3, write(']'). aux2 :- read(X),(X='atributo'->write(','),atributo; X='fin'->write('')). aux3 :- read(X),(X='valor'->valorarreglo,aux4; X='fin'->write('')). aux4 :- read(X),(X='valor'->write(','),valorarreglo,aux4; X='fin'->write('')). cadena :- read(X),write('"'),write(X),write('"'). numero :- read(X),write(X). valoratributo(M) :-read(T),(T='cadena'->cadena; T='numero'->numero; T='arreglo'->arreglo; T='metodo'->metodo(M); T='objeto'->objeto). valorarreglo :-read(T),(T='cadena'->cadena; T='numero'->numero; T='arreglo'->arreglo; T='objeto'->objeto). metodo(M) :- write('"function() {'),instruccion,write('return '),write(M),write(' }"'). instruccion :-read(I),(I='asignacion'->asignacion,instruccion; I='decision'->decision,instruccion; I='fin'->write('')). asignacion :- numero,write('='),numero,write(';'). decision :- write('if ('),condicion,write('){'),instruccion,write('}'),aux5. aux5 :- read(I),(I='sino'->falso; I='fin'->write('')). falso :- write('else {'), instruccion, write('}'). condicion :- numero. :- objeto.
run
|
edit
|
history
|
help
0
JPROBA
01-09-2021-listas de objetos v2
inicio red proba
jproba inicio 9 novV3
Tarea
SantillanChalico Arbol de decision
Redes Bayesianas- Medina Paredes
nn
Test1
Tarea 4NM70 HCHCHP.2