pxt-calliope/docs/reference/basic/show-string.md
2016-04-18 08:33:09 -07:00

42 lines
1.0 KiB
Markdown

# Show String
Show a string on the [LED screen](/device/screen) one character at a time (scrolling from left to right).
```sig
basic.showString("Hello!")
```
### Parameters
* `text` - a [String](/reference/types/string)
* (optional) `ms` - [Number](/reference/types/number); the time (in milliseconds) before scrolling left by one LED; the larger the number, the slower the scroll
### Examples:
To display Hello:
```blocks
basic.showString("Hello")
```
To display the content of a string variable:
```blocks
let s = "Hi"
basic.showString(s)
```
### Other show functions
* use [show number](/reference/basic/show-number) to show a number on the screen
* use [show animation](/reference/basic/show-animation) to show a series of images on the screen
### Lessons
[answering machine](/lessons/answering-machine), [rock paper scissors](/lessons/rock-paper-scissors), [love meter](/lessons/love-meter)
### See also
[String](/reference/types/string), [show number](/reference/basic/show-number), [show animation](/reference/basic/show-animation)