Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
programa1
objeto:- write('{'),read(X), (X='atributo'->atributo; write('')),write('}'). a1:- read(X),(X='atributo'-> write(','),atributo;(X='fin'->write(''))). atributo:- read(X), write('"'), write(X), write('":'),tipoatributo(X),a1. tipoatributo(M):- read(X), (X='metodo'->metodo(M);(X='numero'->numero; X='cadena'->cadena); (X='objeto'->objeto; X='arreglo'->arreglo;write('error'))). cadena:- read(X), write('"'), write(X), write('"'). numero:-read(X), write(X). arreglo:- write('['), otroatributo, auxarray,write(']'). otroatributo:- read(X), (X='numero'->numero; X='cadena'->cadena; X='objeto'->objeto; X='arreglo'->arreglo;write('error')). metodo(M):- write('"function() {'),a2,write(' return '), write(M), write(';}"'). a2:- read(X), (X='decision'->decision;a3(X)). a3(X):- X='asignacion' -> asignacion;(a4(X)). a4(X):- X='fin' -> write('');(write('ERROR: '),write(X)). auxarray:- read(X),(X='natributo'-> write(','),otroatributo,auxarray;(X='fin'->write(''))). asignacion:- read(X), write(X), write('='), read(Y), write(Y), write(';'),a2. decision:- write('if('),condicion,write(')'), verdadero, write('}'),falso,write('}'). condicion:-read(X), write(X). verdadero:- write('{'),a2. falso:- write('else {'),a2. :-objeto.
run
|
edit
|
history
|
help
0
QUERYS-AGUIRREMONTOYALIZETH-SEC3NM70
industria 2
clase1
Tarea 1
A1
BD_Actividad_Márquez Ami_04-03-2021
el objeto sector industrial
Rivera Martinez Joseph Emmanuel Prolog 1
LOCO 0.0
arreglos