DELCHAR/de

From MCS Wiki AVR
< DELCHAR
Revision as of 19:14, 15 February 2013 by Admin (Talk | contribs)
Jump to: navigation, search

Contents

= (**COPIED FROM ENGLISH PAGE**) === Action

Delete one character from a string.

 

 

Syntax

DELCHAR string, pos

 

 

Remarks

string

The string where the character is removed from.

pos

The position where the character must be removed from.

A value of 1 would remove the first character.

 

Do not confuse with the DELCHARS statement which removes all characters based on a character value.

 

The DELCHAR removes one character from a string based on an index.

 

 

 

See also

DELCHARS , INSERTCHAR , INSTR , MID , CHARPOS , REPLACECHARS

 

 

Example


'----------------------------------------------------------------
' (c) 1995-2011, MCS
' del_insert_chars.bas
' This sample demonstrates the delchar, delchars and insertchar statements
'-----------------------------------------------------------------
$regfile="m88def.dat"
$crystal = 8000000
$hwstack = 40
$swstack = 40
$framesize = 40
 
dim s as string * 30
s = "This is a test string" ' create a string
delchar s, 1 ' remove the first char
print s ' print it
 
insertchar s,1, "t" ' put a small t back
print s
 
delchars s,"s" ' remove all s
print s
end

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language
Database error - MCS Wiki AVR

Database error

Revision as of 19:14, 15 February 2013 by Admin (Talk | contribs)
Jump to: navigation, search
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "". Database returned error "1020: Record has changed since last read in table 'avr_page' (localhost)".
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language