Recent

Author Topic: writeln output string length  (Read 992 times)

freemind001

  • Jr. Member
  • **
  • Posts: 51
writeln output string length
« on: February 21, 2024, 10:02:53 pm »
Code: Pascal  [Select][+][-]
  1. procedure Log(EventType: TEventType; aMessage: string; StdOutputOnly: boolean);
  2. begin
  3.     if StdOutputOnly then
  4.       writeln(aMessage)
  5.     else
  6.     begin
  7.       writeln(aMessage);
  8.       AppEventLog.Log(EventType, aMessage);
  9.     end;
  10. end;        

writeln(aMessage) output length is only 256 symbols, why?

if i do
Code: Pascal  [Select][+][-]
  1. writeln('{1000 symbols here...}');
it's ok, but
Code: Pascal  [Select][+][-]
  1. writeln(aMessage + '{1000 symbols here...}');
still has the limitation
« Last Edit: February 21, 2024, 10:05:41 pm by freemind001 »

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: writeln output string length
« Reply #1 on: February 21, 2024, 10:06:16 pm »
{$H+}
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

rvk

  • Hero Member
  • *****
  • Posts: 6944
Re: writeln output string length
« Reply #2 on: February 21, 2024, 10:13:20 pm »

freemind001

  • Jr. Member
  • **
  • Posts: 51
Re: writeln output string length
« Reply #3 on: February 21, 2024, 10:15:22 pm »
works, thank you
can I use it together with {$mode objfpc}?

rvk

  • Hero Member
  • *****
  • Posts: 6944
Re: writeln output string length
« Reply #4 on: February 21, 2024, 10:18:14 pm »
Yes. Normally if you create a default program with lazarus, this is already automatically added at the top.

Code: Pascal  [Select][+][-]
  1. {$mode objfpc}{$H+}

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: writeln output string length
« Reply #5 on: February 22, 2024, 06:57:30 am »
or use {$mode delphi} where {$H+} is implied. (the only mode where that is the case)
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018