Difference between revisions of "Manuals/calci/MIDB"

(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...")
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<div style="font-size:30px">'''MIDB (Text,Start_Char,Num_Char) '''</div><br/>
 +
where,
 +
*<math>Text</math> is a text string containing the characters to be extracted,
 +
*<math>Start-Char</math> is the starting position of the first character to be extracted, and
 +
*<math>Num-Char</math> represents the number of characters to be displayed in bytes.
 +
**MIDB(), returns a specific number of characters from a text string starting at the position you specify.MIDB is intended for use with languages that use the double-byte character set (DBCS).
  
'''MIDB'''(Text, Start_num, Number_chars)
+
== Description ==
  
where,
+
MIDB (Text,Start_Char,Num_Char)
 +
e.g. MIDB("<#*>",1,2) displays '''<#''' as a result.
  
'''Text''' - is the text string to extract.
+
*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>Text</math> is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
 +
*<math>Start-Char</math> should be &gt; 1, else Calci displays #N/A error message.
 +
*If <math>Start-Char</math> &gt; 'length of text', Calci displays empty text ("").
 +
*If <math>Start-Char</math> + <math>Num-Char</math> &gt; 'length of text', Calci displays the characters up to the end of text.
 +
*If <math>Num-Char</math> is negative, Calci displays an #N/A error message.
  
'''Start_num''' - is the position of the first characters.
+
== Examples ==
  
'''Number_chars''' - represents the number of charcaters you want MID to extract.
+
<div id="2SpaceContent" class="zcontent" align="left">
  
</div>
+
{| id="TABLE3" class="SpreadSheet blue"
----
+
|- class="even"
<div id="1SpaceContent" class="zcontent" align="left">
+
| class="sshl_f" |ABC DEF
 +
| class=" " |
 +
| class=" " |
  
MIDB returns a spcific number of characters from a text string, based on the number of bytes you specify. MIDB is intended for use with languages that use the double-byte character set (DBCS).
+
|- class="odd"
 +
| class="sshl_f" |
 +
| class=" " |
 +
| class=" " |
  
</div>
+
|- class="even"
----
+
| class="sshl_f" |*123*123
<div id="7SpaceContent" class="zcontent" align="left">
+
| class=" " |
 +
| class=" " |
  
If Start_char &lt; 1, MIDB returns #ERROR.
+
|- class="odd"
 
+
| class="sshl_f" |
If Number_chars &lt; 0, it returns #ERROR.
+
| class=" " |
 
+
| class=" " |
If Start_char &gt; Lengthof Text, It returns all text.
+
|}
 
 
If Start_char or Number_chars omitted, it returns all text
 
  
</div>
+
=MIDB(A1,1,5) : Displays 5 character string in cell A1 starting from 1st position. <br />Displays '''ABC D''' as the output. Space character is also included.
----
+
=MIDB(A2,1,1) : Displays 1 character string in cell A3 starting from 1st position. <br />Displays '''*''' as the output.
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
+
<font color ="Red">Need to give examples with characters/language supporting DBCS </font>
  
MIDB
+
==Related Videos==
  
</div></div>
+
{{#ev:youtube|6uxeKVfA8JQ|280|center|MID}}
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
  
Lets see an example in (Column1, Row2)
+
== See Also ==
  
<nowiki>=MIDB(R1C1,2,6)</nowiki>
+
*[[Manuals/calci/MID | MID]]
  
MIDB returns OHN S.
+
== References ==
  
Lets see an another example in (Column1,Row4)
+
*[http://en.wikipedia.org/wiki/String_(computer_science) String]
  
<nowiki>=MIDB(R1C1)</nowiki>
 
  
MIDB returns JOHN SMITH.
 
  
Consider an example in (Column1, Row3)
 
  
<nowiki>=MIDB(R1C1,2)</nowiki>
+
*[[Z_API_Functions | List of Main Z Functions]]
 
 
MIDB returns JOHN SMITH.
 
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|+ Default Calci
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="  " | JOHN SMITH
 
|
 
|
 
|
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | OHN S
 
|
 
|
 
|
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | JOHN SMITH
 
|
 
|
 
|
 
|- class="even"
 
| Row4
 
| class="sshl_f" | JOHN SMITH
 
|
 
|
 
|
 
|- class="odd"
 
| class=" " | Row5
 
| class="                    SelectTD1 ChangeBGColor SelectTD1" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
|}
 
 
 
{| id="TABLE3_menu"
 
| align="right" | TABLE3
 
| <span align="left">[[Image:calci1.gif]]</span>
 
|
 
|
 
[[Image:bold.gif]]
 
|
 
[[Image:italic.gif]]
 
|
 
[[Image:normal.gif]]
 
|
 
[[Image:underline.gif]]
 
|
 
[[Image:border.gif]]
 
|
 
[[Image:numbers.gif]]
 
|
 
[[Image:sort.gif]]
 
|
 
[[Image:formatcells.gif]]
 
|
 
[[Image:graphs.gif]]
 
| $
 
|}
 
  
</div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 16:23, 13 August 2018

MIDB (Text,Start_Char,Num_Char)


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(), returns a specific number of characters from a text string starting at the position you specify.MIDB is intended for use with languages that use the double-byte character set (DBCS).

Description

MIDB (Text,Start_Char,Num_Char) 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(A2,1,1) : Displays 1 character string in cell A3 starting from 1st position.
Displays * as the output.

Need to give examples with characters/language supporting DBCS

Related Videos

MID

See Also

References