Bug 48816 - Отсутствует функция print. Нельзя вывести результат
Summary: Отсутствует функция print. Нельзя вывести результат
Status: CLOSED NOTABUG
Alias: None
Product: Sisyphus
Classification: Development
Component: libduktape (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Vitaly Lipatov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-15 14:07 MSK by obidinog@basealt.ru
Modified: 2024-02-09 12:29 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description obidinog@basealt.ru 2023-12-15 14:07:47 MSK
Платформа:
p10-kworkstation-10.2.1-x86-64 - обновленный до Sisyphus

Пакет:
libduktape 2.7.0-alt2

Шаги:
Выполнить пример 
$ duk 
duk> print('Hello World!')

Результат: Отсутствует функция print
ReferenceError: identifier 'print' undefined
    at [anon] (duk_js_var.c:1234) internal
    at global (input:1) preventsyield
Comment 1 obidinog@basealt.ru 2023-12-15 14:44:06 MSK
Я как понимаю он отдельно собирается https://github.com/svaarala/duktape/tree/master/extras/print-alert

судя по https://duktape.org/guide
Comment 2 Sergey V Turchin 2024-02-09 12:29:54 MSK
(Ответ для obidinog@basealt.ru на комментарий #1)
> https://github.com/svaarala/duktape/tree/master/extras/print-alert
"The default print() and alert() built-ins were removed in Duktape 2.x because they depended on stdout/stderr and were thus a portability issue for some targets."