-
Notifications
You must be signed in to change notification settings - Fork 8
left
Anobium edited this page Oct 18, 2020
·
1 revision
Syntax:
output = Left(source, count)
Command Availability:
Available on all microcontrollers
Explanation:
The Left
function will extract the leftmost count
characters from
the input string source
, and return them in a new string.
Example:
'Set chip model
#chip 16F1936
'Set up hardware serial connection
#define USART_BAUD_RATE 9600
#define USART_TX_BLOCKING
'Fill a string with a message
Dim TestData As String
TestData = "Hello, world!"
'Display the leftmost 5 characters
'Will display "Hello"
HSerPrint Left(TestData, 5)
HSerPrintCRLF