Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadbytes, loadTable and some minor fixes with other modified functions. #7638

Open
wants to merge 14 commits into
base: dev-2.0
Choose a base branch
from

Conversation

perminder-17
Copy link
Contributor

@perminder-17 perminder-17 commented Mar 16, 2025

No description provided.

@perminder-17 perminder-17 changed the title loadbytes, loadBolb, loadTable loadbytes, loadTable and some minor fixes with other modified functions. Mar 20, 2025
@perminder-17 perminder-17 requested review from holomorfo and removed request for holomorfo March 20, 2025 01:38
@perminder-17 perminder-17 requested a review from holomorfo March 20, 2025 02:28
@perminder-17 perminder-17 marked this pull request as ready for review March 20, 2025 02:28
Copy link

@holomorfo holomorfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perminder-17 Changes look good, only please resolve the conflicts in the PR and I had a small question regarding a potential for loop that might be needed instead of explicitly unfolding it.
@davepagurek @limzykenneth

* // Display each table cell value on the canvas one below the other.
* // We use a variable 'y' to increment the vertical position.
* let y = 20;
* text(table.getString(0, 0), 10, y); // 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a pedagogical or didactic reason to have these additions unfolded and not in a for loop like in the rest of the previous examples? It's correct of course, but I found it strange and different than the pattern you were following up until now.
I see that each line has the comment of the Animal type, but since its not being rendered, was wondering if it would not be best to show the list after the a for loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, Cristian, but these are just modified functions, I have just updated it so it should display on the canvas instead of my console. Here's the previous implementation which again didn't uses a for loop in it.

   *   print(table.getString(0, 0)); // 0
   *   print(table.getString(0, 1)); // Capra hircus
   *   print(table.getString(0, 2)); // Goat
   *   print(table.getString(1, 0)); // 1
   *   print(table.getString(1, 1)); // Panthera pardus
   *   print(table.getString(1, 2)); // Leopard
   *   print(table.getString(2, 0)); // 2
   *   print(table.getString(2, 1)); // Equus zebra
   *   print(table.getString(2, 2)); // Zebra

so, I didn't change it completely using a for loop.

@perminder-17 perminder-17 requested a review from holomorfo March 21, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants