Colorizing text in the console lazarus / 66-Unix ---------------------------------------------------------------------- acerm · 2019-11-27 12:02 Hello! Does anyone know how can I write colored text to the console? I have a c ++ example that works, but I can't make it work on obj pascal Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #include  int main(){    std::cout << "\033[033;31m  red text" << std::endl;    return(0);} Output: red text Obj pascal: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i writeln('\033[033;31m  red text');  Output: \033[033;31m  red text Thanks ---------------------------------------------------------------------- marcov · 2019-11-27 12:24 Change the C escapes like \033 to proper Pascal writeln syntax using # ? ---------------------------------------------------------------------- acerm · 2019-11-27 13:45 Thanks a lot marcov! Now is working fine. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i writeln(#27'[31mred text'); ---------------------------------------------------------------------- bee · 2019-11-28 03:42 I've made ansiCRT unit for that purpose. You may take a look at it here. Hope it helps.