Difference between revisions of "Manual:DIL Manual/insert()"
Jump to navigation
Jump to search
(XML import) |
(XML import) |
||
| Line 1: | Line 1: | ||
| + | <span id="bpinsert"></span> | ||
| + | |||
| + | '''Function: '''<i><!--CODE-->insert( sl : <stringlist or intlist>, i : integer, s : string ) ;</i><!--ENDCODE--> | ||
| + | |||
| + | <!--TERM--> '''sl''' | ||
| + | <!--DEFINITION--> the stringlist or intlist you are inserting to | ||
| + | <!--TERM--> '''i''' | ||
| + | <!--DEFINITION--> the index where you want to insert the string | ||
| + | <!--TERM--> '''s''' | ||
| + | <!--DEFINITION--> the string you want to insert | ||
| + | |||
| + | This function allows you to insert a string in a stringlist or intlist | ||
| + | with out re-writing the entire stringlist or intlist to do it. The | ||
| + | following Dil will add a string in order to a stringlist. | ||
| + | '''Example:''' | ||
| + | <i><!--CODE--> | ||
| + | ---~---~---~---~---~---~---~---~--- | ||
| + | dilbegin stringlist add_in_order (sl:stringlist,s:string); | ||
| + | var | ||
| + | i:integer; | ||
| + | ln:integer; | ||
| + | code | ||
| + | dilend | ||
| + | ---~---~---~---~---~---~---~---~--- | ||
| + | |||
| + | </i><!--ENDCODE--> | ||
| + | |||
| + | |||
| + | |||
| + | ---~---~---~---~---~---~---~---~--- | ||
<span id="bpinsert"></span> | <span id="bpinsert"></span> | ||
| Line 24: | Line 54: | ||
ln:integer; | ln:integer; | ||
code | code | ||
| − | + | dilend | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
---~---~---~---~---~---~---~---~--- | ---~---~---~---~---~---~---~---~--- | ||
Latest revision as of 22:32, 4 December 2025
Function: insert( sl : <stringlist or intlist>, i : integer, s : string ) ;
sl
the stringlist or intlist you are inserting to
i
the index where you want to insert the string
s
the string you want to insert
This function allows you to insert a string in a stringlist or intlist with out re-writing the entire stringlist or intlist to do it. The following Dil will add a string in order to a stringlist. Example: ---~---~---~---~---~---~---~---~---
dilbegin stringlist add_in_order (sl:stringlist,s:string); var i:integer; ln:integer; code
dilend
---~---~---~---~---~---~---~---~---
---~---~---~---~---~---~---~---~---
Function: insert( sl : <stringlist or intlist>, i : integer, s : string ) ;
sl
the stringlist or intlist you are inserting to
i
the index where you want to insert the string
s
the string you want to insert
This function allows you to insert a string in a stringlist or intlist with out re-writing the entire stringlist or intlist to do it. The following Dil will add a string in order to a stringlist. Example: ---~---~---~---~---~---~---~---~---
dilbegin stringlist add_in_order (sl:stringlist,s:string); var i:integer; ln:integer; code
dilend
---~---~---~---~---~---~---~---~---
---~---~---~---~---~---~---~---~---