Skip to content
Anobium edited this page Oct 18, 2020 · 1 revision

Fill

Syntax:

    stringvar =  Fill ( byte_value_of_the_new_length , pad_character )

Command Availability:

Available on all microcontrollers

Explanation:

The Fill function is used to create string to a specific length that is of a specific character.

The length of the string is specified by the first parameter. The character used to pad the string is specified by the second parameter, this parameter is optional as the " "(space) character is assumed.

A typical use is to fill a string to be displayed on an LCD or serial terminal.

Example:

    'Set chip model
    #chip 16F886


    'Set up hardware serial connection
    #define USART_BAUD_RATE 9600
   #define USART_TX_BLOCKING



    HserPrint Fill ( 16, "" ) ;will print a string of '*'
    HSerPrintCRLF

For more help, see Asc

Clone this wiki locally