Новая Школа - онлайн-школа подготовки к ЕГЭ
Задача Задача №3623440
А
Аноним
18 июня 2026 14:20 · публичный вопрос
А
Аноним

555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

Ответ нейросети
18 июня 2026 14:20

Interpretation (Oracle DBMS_PIPE)

  • CHR(99) is the character with code 99, i.e., 'c'. So CHR(99)||CHR(99)||CHR(99) equals 'ccc'.
  • DBMS_PIPE.RECEIVE_MESSAGE is the receive call for a named pipe (inter-session communication). The code is trying to receive a message from the pipe named 'ccc' with a timeout of 15 seconds.

What the line does or attempts to do

  • As written, DBMS_PIPE.RECEIVE_MESSAGE is a procedure/function call. If written exactly as shown in a PL/SQL block, it would not multiply 555 by the result (the 555 prefix is likely a problem-number or a formatting artifact). The call itself also lacks the OUT parameter that normally holds the received message. So in strict syntax, the line by itself is not a complete valid statement.

Two common valid usages (with the typical signatures)

  1. RECEIVE_MESSAGE with an OUT parameter for the message and a status/timeout:
  • Typical signature (one common variant): RECEIVE_MESSAGE(pipe_name IN VARCHAR2, message OUT VARCHAR2, status OUT PLS_INTEGER, timeout IN PLS_INTEGER DEFAULT 60)

  • Example usage: declare v_pipe varchar2(3) := CHR(99)||CHR(99)||CHR(99); -- 'ccc' v_msg varchar2(32767); v_status pls_integer; begin DBMS_PIPE.RECEIVE_MESSAGE(v_pipe, v_msg, v_status, 15); if v_status = 0 then dbms_output.put_line('Received: ' || v_msg); else dbms_output.put_line('No message within timeout (status='||v_status||')'); end if; end;

  • What happens: waits up to 15 seconds for a message on pipe 'ccc'. If a message arrives, it goes into v_msg and v_status is 0. If not, you get a nonzero status (timeout).

  1. RECEIVE_MESSAGE with a return value (alternative syntax in some setups):
  • Some environments use a return/OUT parameter form like: v_msg := DBMS_PIPE.RECEIVE_MESSAGE(v_pipe, 15); (Note: this is less common; many Oracle docs use the OUT parameter plus a status.)

  • If you see a form like this, you would still need to declare the pipe name and capture the returned message in a variable, plus handle timeout/status per the signature used in your environment.

Important contextual notes

  • You must have created the pipe beforehand, e.g.: DBMS_PIPE.CREATE_PIPE('ccc', 1000);
  • A corresponding sender should send a message with DBMS_PIPE.SEND_MESSAGE('ccc', 'your text here');
  • The CHR(99)||CHR(99)||CHR(99) trick is just a way to write the pipe name as 'ccc' without a string literal.

If you want, tell me which exact signature your Oracle version/documentation uses for DBMS_PIPE.RECEIVE_MESSAGE, and I’ll tailor a precise, copy-paste-ready snippet. Also I can show a full small example including creating the pipe, sending a message, and receiving it.