____________________________________________________________________________________
---OUTPUT:
_____________________________________________________________________________________
SET SERVEROUTPUT ON SET VERIFY OFF DECLARE v_string VARCHAR2(200); v_string2 VARCHAR2(200); v_length NUMBER(10); e_wrong# EXCEPTION; PRAGMA EXCEPTION_INIT(e_wrong#,-06502); BEGIN v_length := '&AMOUNT'; IF v_length > 40 OR v_length < 5 THEN RAISE e_wrong#; END IF; -- v_string := RPAD('*',v_length,'*'); v_string2 := v_string; -- DBMS_OUTPUT.PUT_LINE('_____PL/SQL NO ES UN'||CHR(10)||'LENGUAJE DE PROGRAMACIÓN...'); DBMS_OUTPUT.PUT_LINE(v_string); -- v_string := '*'||REPLACE(SUBSTR(v_string,2,v_length-2),'*',' ')||'*'; -- FOR I IN 1..v_length/2 LOOP DBMS_OUTPUT.PUT_LINE(v_string); END LOOP; -- DBMS_OUTPUT.PUT_LINE(v_string2); DBMS_OUTPUT.PUT_LINE('PL/SQL ES MAGIA'); -- EXCEPTION WHEN e_wrong# THEN DBMS_OUTPUT.PUT_LINE('Solo Valores Numéricos en un rango de 5 al 41!!!'); END;
---OUTPUT: