add initial toString block (#1958)

This commit is contained in:
Joey Wunderlich
2019-04-04 13:41:51 -07:00
committed by Peli de Halleux
parent b611909d99
commit aa51b7e014
4 changed files with 22 additions and 1 deletions

View File

@ -53,3 +53,14 @@ namespace control {
//% shim=pxtrt::runtimeWarning
export function runtimeWarning(message: string) { }
}
/**
* Convert any value to a string
* @param value value to be converted to a string
*/
//% help=text/to-string weight=1
//% block="convert $value=variables_get(myValue) to string"
//% blockId=variable_to_string blockNamespace="text"
function toString(value: any): string {
return "" + value;
}