user7837: I have this GSM module I got for my arduino project and I am trying to access the call feature, but the function makes no sense.
  boolean Adafruit_FONA::callPhone(char *number) {
  char sendbuff[35] = "ATD";
  strncpy(sendbuff+3, number, min(30, strlen(number)));
  uint8_t x = strlen(sendbuff);
  sendbuff[x] = ';';
  sendbuff[x+1] = 0;
  //Serial.println(sendbuff);

  return sendCheckReply(sendbuff, "OK");
  }

This is the function however how is char being used to display a phone number in the parameter? 

user5168: Keeping it simple:
char *number; a variable pointing to a character (or string of them).
char sendbuff[35]; 35 characters in a row, making a string.
The first 3 chars at locatiion sendbuff are initialised to "A", "T", & "D", then the string at "number" is copied to it (to a maximum of 30 characters, by taking the lesser of the length of "number" or 30. This is important to avoid over-running the space allocated.
This string of characters gets sent out; & a check is made for an "O" & a "K"
If you don't 'get' pointers, you need to look it up, as it's pretty central stuff.

user368: It's passed as a char*. This can be derived from either a string literal (e.g. "212555121") or from a String via its c_str() method.

7837: <p>I have this GSM module I got for my arduino project and I am trying to access the call feature, but the function makes no sense.</p>

<pre><code>  boolean Adafruit_FONA::callPhone(char *number) {
  char sendbuff[35] = "ATD";
  strncpy(sendbuff+3, number, min(30, strlen(number)));
  uint8_t x = strlen(sendbuff);
  sendbuff[x] = ';';
  sendbuff[x+1] = 0;
  //Serial.println(sendbuff);

  return sendCheckReply(sendbuff, "OK");
  }
</code></pre>

<p>This is the function however how is char being used to display a phone number in the parameter? </p>
 5168: <p>Keeping it simple:</p>

<p><code>char *number;</code> a variable pointing to a character (or string of them).<br>
<code>char sendbuff[35];</code> 35 characters in a row, making a string.<br>
The first 3 chars at locatiion sendbuff are initialised to "A", "T", &amp; "D", then the string at "number" is copied to it (to a maximum of 30 characters, by taking the lesser of the length of "number" or 30. This is important to avoid over-running the space allocated.<br>
This string of characters gets sent out; &amp; a check is made for an "O" &amp; a "K"</p>

<p>If you don't 'get' pointers, you need to look it up, as it's pretty central stuff.</p>
 368: <p>It's passed as a <code>char*</code>. This can be derived from either a string literal (e.g. <code>"212555121"</code>) or from a <code>String</code> via its <code>c_str()</code> method.</p>
