<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with #array-declaration-style - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=%23array-declaration-style</link>
      <pubDate>Sun, 08 Aug 2021 19:11:48 +0000</pubDate>
         <description>Tagged with #array-declaration-style - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/tagged%23array-declaration-style/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>How to modify all array elements in 1 line?</title>
      <link>https://forum.processing.org/two/discussion/14244/how-to-modify-all-array-elements-in-1-line</link>
      <pubDate>Mon, 04 Jan 2016 03:07:03 +0000</pubDate>
      <dc:creator>ei1</dc:creator>
      <guid isPermaLink="false">14244@/two/discussions</guid>
      <description><![CDATA[<p><code>float[] point;
point = {2, 3};</code><br />
How does one do this?<br />
Do you really have to define elements individually?</p>
]]></description>
   </item>
   <item>
      <title>Array:got confuse with same variable one used with [ ] and one as ordinary</title>
      <link>https://forum.processing.org/two/discussion/12912/array-got-confuse-with-same-variable-one-used-with-and-one-as-ordinary</link>
      <pubDate>Fri, 09 Oct 2015 12:33:43 +0000</pubDate>
      <dc:creator>PlzHelp</dc:creator>
      <guid isPermaLink="false">12912@/two/discussions</guid>
      <description><![CDATA[<p>In the processing handbook Ex_08 Unit 36 Typography I got confused with the use of currentLetter in draw</p>

<pre lang="processing">
// Each letter enters from the bottom in sequence and

// stops when it reaches its destination

PFont font;

String word = "rise";

char[] letters;

float[] y; // Y-coordinate for each letter

int currentLetter = 0; // Letter currently in motion

void setup() {

  size(100, 100);

  font = loadFont("EurekaSmallCaps-36.vlw");

  textFont(font);

  letters = word.toCharArray();

  y = new float[letters.length];

  for (int i = 0; i &lt; letters.length; i++) {

    y[i] = 130; // Position off the screen
  }
  fill(0);
}

void draw() {
  background(204);
  if (y[currentLetter] &gt; 35) {    
    y[currentLetter] -= 3; // Move current letter up
  } else {
    if (currentLetter &lt; letters.length - 1) {
     
     currentLetter++; // Switch to next letter
     
    }
  }
// Calculate x to center the word on screen
  float x = (width - textWidth(word)) / 2;
  for (int i = 0; i &lt; letters.length; i++) {
    text(letters[i], x, y[i]);
    x += textWidth(letters[i]);
  }
}
</pre>

<p>why did in draw if (y[currentLetter] &gt; 35) stored the value of 130 I thought it is for y[i]  currentLetter is 0 right ? how is that possible I seem not understand why putting [] in currentLetter became 130 ?</p>
]]></description>
   </item>
   <item>
      <title>Array Initialisation Difference</title>
      <link>https://forum.processing.org/two/discussion/11827/array-initialisation-difference</link>
      <pubDate>Fri, 24 Jul 2015 14:36:47 +0000</pubDate>
      <dc:creator>Zac</dc:creator>
      <guid isPermaLink="false">11827@/two/discussions</guid>
      <description><![CDATA[<p>Is there any difference between (and if so what is it)</p>

<p><code>String values[] = new String[0];</code></p>

<p>and</p>

<p><code>String[] values = new String[0];</code>?</p>

<p>Thanks, Zac</p>
]]></description>
   </item>
   </channel>
</rss>