Difference between revisions of "Manuals/calci/MIDB"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''MIDB'''(Text, Start_num, Number_chars) where, '''Text''' - is the text string to extract. '''Start_nu...") |
|||
Line 1: | Line 1: | ||
− | + | =MIDB(txt, snum, nob)= | |
− | + | where, | |
+ | *<math>txt</math> is a text string containing the characters to be extracted, | ||
+ | *<math>snum</math> is the starting position of the first character to be extracted, and | ||
+ | *<math>nob</math> represents the number of characters to be displayed in bytes. | ||
− | + | MIDB() displays a specific number of characters from a text string, with reference to the specified starting position and specified number of bytes. | |
− | + | == Description == | |
− | + | MIDB(txt, snum, nob) | |
− | ''' | + | e.g. MIDB("<#*>",1,2) displays '''<#''' as a result. |
− | </ | + | *MIDB works with the languages that use 'Double Byte Character Set' (DBCS). |
− | + | *MIDB counts each double byte character as 2, when language is set to DBCS. Else it counts 1 byte per character. | |
− | < | + | *If argument <math>txt</math> is directly entered in the command, it should be enclosed in double quotes (e.g. "Name"). |
+ | *<math>snum</math> should be > 1, else Calci displays #N/A error message. | ||
+ | *If <math>snum</math> > 'length of text', Calci displays empty text (""). | ||
+ | *If <math>snum</math> + <math>nob</math> > 'length of text', Calci displays the characters up to the end of text. | ||
+ | *If <math>noc</math> is negative, Calci displays an #N/A error message. | ||
− | + | == Examples == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div id="2SpaceContent" class="zcontent" align="left"> | <div id="2SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
− | |||
|- class="even" | |- class="even" | ||
+ | | class="sshl_f" |ABC DEF | ||
| class=" " | | | class=" " | | ||
− | | | + | | class=" " | |
− | + | ||
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" | |
− | | class=" | + | | class=" " | |
− | | | + | | class=" " | |
− | | | + | |
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="sshl_f" |*123*123 |
− | | class=" | + | | class=" " | |
− | | | + | | class=" " | |
− | | | + | |
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | | |
− | | class="sshl_f" | + | | class=" " | |
− | + | | class=" " | | |
− | |||
− | | | ||
− | | | ||
− | | | ||
− | | class=" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
|} | |} | ||
− | + | =MIDB(A1,1,5) : Displays 5 character string in cell A1 starting from 1st position. Displays '''ABC D''' as the output. Space character is also included. | |
− | + | =MIDB(A3,1,1) : Displays 1 character string in cell A3 starting from 1st position. Displays '''*''' as the output. | |
− | + | ||
− | + | == See Also == | |
− | + | ||
− | + | *[[Manuals/calci/MID | MID]] | |
− | + | ||
− | + | == References == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[ | ||
− | | | ||
− | |||
− | |||
− | |||
− | + | *[http://en.wikipedia.org/wiki/String_(computer_science) String] | |
− |
Revision as of 14:03, 26 January 2014
MIDB(txt, snum, nob)
where,
- is a text string containing the characters to be extracted,
- is the starting position of the first character to be extracted, and
- represents the number of characters to be displayed in bytes.
MIDB() displays a specific number of characters from a text string, with reference to the specified starting position and specified number of bytes.
Description
MIDB(txt, snum, nob)
e.g. MIDB("<#*>",1,2) displays <# as a result.
- MIDB works with the languages that use 'Double Byte Character Set' (DBCS).
- MIDB counts each double byte character as 2, when language is set to DBCS. Else it counts 1 byte per character.
- If argument is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
- should be > 1, else Calci displays #N/A error message.
- If > 'length of text', Calci displays empty text ("").
- If + > 'length of text', Calci displays the characters up to the end of text.
- If is negative, Calci displays an #N/A error message.
Examples
ABC DEF | ||
*123*123 | ||
=MIDB(A1,1,5) : Displays 5 character string in cell A1 starting from 1st position. Displays ABC D as the output. Space character is also included. =MIDB(A3,1,1) : Displays 1 character string in cell A3 starting from 1st position. Displays * as the output.