Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > SDL script for generating code > Keywords > %getchar keyword (SDL script)
  
%getchar keyword (SDL script)
This keyword returns the character that is in the specified position of a string.
You may want to use this keyword with the %getlength keyword to interrogate the characters in a string.
Syntax
%getchar "<string>" <character position>
In this example, Char is set to 'h'.
%setvar "Char" = %getchar "13 characters" 5
In this example, nPos specifies the character position and the passed parameter strParamList specifies the string.
%setlocalvar "strChar" = %getchar %getparam "strParamList" %getlocalvar "nPos"