Recent

Author Topic: While loop and two-dimensional array  (Read 4074 times)

PascalDragon

  • Hero Member
  • *****
  • Posts: 2758
  • Compiler Developer
Re: While loop and two-dimensional array
« Reply #15 on: January 22, 2021, 10:31:54 am »
Am i the only one, who does not like the general "sound" of replies here? Is it a such an effort to answer with some more politeness and friendliness? I would understand that a first time poster would never come back and I do not accept the point, that this is his/her problem.

Yes, you're the only one. egsuh stated that they don't like to use code-tags, but it's policy on this forum to use them, so if they like it or not doesn't matter, if they don't use the tags they'll be called out for it just like any user who doesn't use them (especially as egsuh has more than 500 posts thus should know better, for posters with less posts it would be done more polite of course).

MarkMLl

  • Hero Member
  • *****
  • Posts: 2088
Re: While loop and two-dimensional array
« Reply #16 on: January 22, 2021, 10:47:51 am »
Am i the only one, who does not like the general "sound" of replies here? Is it a such an effort to answer with some more politeness and friendliness? I would understand that a first time poster would never come back and I do not accept the point, that this is his/her problem.

Yes, you're the only one. egsuh stated that they don't like to use code-tags, but it's policy on this forum to use them, so if they like it or not doesn't matter, if they don't use the tags they'll be called out for it just like any user who doesn't use them (especially as egsuh has more than 500 posts thus should know better, for posters with less posts it would be done more polite of course).

Since I know that at least part of that criticism is directed at me, can I point out please that in at least one thread yesterday I was doing my best to rein in other people's criticism of an inexperienced user's code, and to keep discussion on topic and focussed on the OP's question.

Speaking as a member of the community, it's generally appreciated if less-experienced users "stay told" when advised of policy by a moderator, or by somebody whose identity is specifically annotated (immediately below their posts count) as having a role as a core developer.

That's my final comment in this thread, since I think OP's happy for the moment and I believe the formatting issue has been resolved.

MarkMLl

Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

PG_97

  • Newbie
  • Posts: 3
Re: While loop and two-dimensional array
« Reply #17 on: January 25, 2021, 10:51:51 am »
I was also very surprised why people were arguing here about how to write their code.
It doesn't matter at all.
The important thing is that it has helped the person.

Thaddy

  • Hero Member
  • *****
  • Posts: 10705
Re: While loop and two-dimensional array
« Reply #18 on: January 25, 2021, 12:37:07 pm »
I did not see this yet. It is concise and modern:
Code: Pascal  [Select][+][-]
  1. var
  2.     arr: array of array of integer = ((1,2,6,7,8,9),(3,4,5));
  3.     i:array of integer;
  4.     j:integer;
  5. begin
  6.    for i in arr do        
  7.      for j in i do
  8.        writeln(j);      
  9. end.

[edit] Just realized ASerge gave pretty much the same answer. Anyway...
« Last Edit: January 25, 2021, 12:58:07 pm by Thaddy »

PascalDragon

  • Hero Member
  • *****
  • Posts: 2758
  • Compiler Developer
Re: While loop and two-dimensional array
« Reply #19 on: January 25, 2021, 01:29:35 pm »
I was also very surprised why people were arguing here about how to write their code.
It doesn't matter at all.

It's not about the code itself, it's that they don't use the tags the forum software provides to display the code to avoid it mismangling it. Just yesterday there was a post of someone who did not use code tags where [ i ] inside the was replaced by italic text. There is a reason why we want users to use the code tags!

speter

  • Full Member
  • ***
  • Posts: 162
Re: While loop and two-dimensional array
« Reply #20 on: January 25, 2021, 11:51:03 pm »
I did not see this yet. It is concise and modern:
Code: Pascal  [Select][+][-]
  1. var
  2.     arr: array of array of integer = ((1,2,6,7,8,9),(3,4,5));
  3.     i:array of integer;
  4.     j:integer;
  5. begin
  6.    for i in arr do        
  7.      for j in i do
  8.        writeln(j);      
  9. end.
Thaddy, when I tried your code I got a syntax error: "NIL" expeected but "(" found (pointing to the first open bracket, line 2).

I am using Laz 2.0.8 / FPC 3.0.4; do I need Laz 2.0.10 / FPC 3.2.0?

cheers
S. :)
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

Laz 2.0.10 / FPC 3.2.0 / Windows 10 (64bit)

PascalDragon

  • Hero Member
  • *****
  • Posts: 2758
  • Compiler Developer
Re: While loop and two-dimensional array
« Reply #21 on: January 26, 2021, 09:13:57 am »
I am using Laz 2.0.8 / FPC 3.0.4; do I need Laz 2.0.10 / FPC 3.2.0?

Yes, dynamic array constants require FPC 3.2.0 or newer.

speter

  • Full Member
  • ***
  • Posts: 162
Re: While loop and two-dimensional array
« Reply #22 on: January 26, 2021, 09:43:09 am »
I am using Laz 2.0.8 / FPC 3.0.4; do I need Laz 2.0.10 / FPC 3.2.0?

Yes, dynamic array constants require FPC 3.2.0 or newer.
Thanks.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

Laz 2.0.10 / FPC 3.2.0 / Windows 10 (64bit)

 

TinyPortal © 2005-2018