On Thu, 26 Sep 2019, Ryan Joseph wrote:
In C I can do:
//
https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences
printf("\033[31;1;4mHello\033[0m");
and get red text in the terminal (MacOS). When I do the same thing with
writeln and FPC it prints the literal charact
> On Sep 26, 2019, at 1:34 PM, Sven Barth via fpc-pascal
> wrote:
>
> And we should probably add a proper TObject enumerator to TObjectList.
>
I just assumed that had to be there! I’ll make a generic replacement like Ben
suggests.
Regards,
Ryan Joseph
> On Sep 26, 2019, at 4:46 PM, Jonas Maebe wrote:
>
> In C, \033 inside a string means "the ASCII character with octal value
> 033". In Pascal, \033 instead a string means "\033". Use this instead:
> writeln(#&033'[31;1;4mHello'#&033'[0m');
that’s why! thanks.
Regards,
Ryan Joseph
__
On 2019-09-26 22:41, Ryan Joseph wrote:
In C I can do:
//
https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences
printf("\033[31;1;4mHello\033[0m");
and get red text in the terminal (MacOS). When I do the same thing
with writeln and FPC it prints the literal characters
On 26/09/2019 22:41, Ryan Joseph wrote:
> In C I can do:
>
> //
> https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences
>
> printf("\033[31;1;4mHello\033[0m");
>
> and get red text in the terminal (MacOS). When I do the same thing with
> writeln and FPC it prints the
In C I can do:
//
https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences
printf("\033[31;1;4mHello\033[0m");
and get red text in the terminal (MacOS). When I do the same thing with writeln
and FPC it prints the literal characters with no colors. Why doesn’t this work
On Thu, Sep 26, 2019 at 11:59 AM Ben Grasset wrote:
> -snip-
>
I meant to change the last part of the revised code example to:
for value in list do
because obviously the pointer cast is no longer necessary in that case.
___
fpc-pascal maillist -
Ryan Joseph schrieb am Do., 26. Sep. 2019, 17:37:
> Question I’ve always had. Why do I need to cast “value” to “pointer"
> otherwise I get: Incompatible types: got "Pointer" expected “TObject”
> error?. I don’t find this very helpful and it doesn’t really make sense
> even.
>
> var
> list: TObj
On Thu, Sep 26, 2019 at 11:37 AM Ryan Joseph wrote:
> Question I’ve always had. Why do I need to cast “value” to “pointer"
> otherwise I get: Incompatible types: got "Pointer" expected “TObject”
> error?. I don’t find this very helpful and it doesn’t really make sense
> even.
>
Well, TObjectLis
Question I’ve always had. Why do I need to cast “value” to “pointer" otherwise
I get: Incompatible types: got "Pointer" expected “TObject” error?. I don’t
find this very helpful and it doesn’t really make sense even.
var
list: TObjectList;
value: TObject;
begin
for pointer(value) in list d
10 matches
Mail list logo