Characters CR+LF

I would like to send CR + LF characters via bluetooth, how to do it?

Please try to send the text: \ n \ r

but without spaces in between...
Built-in special characters : CR = \r, TAB = \t, NewLine = \n
see also @ABG's CRLF gallery project here https://groups.google.com/d/msg/mitappinventortest/vMt5pKmoAMI/h6W9UmixBAAJ

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Yes, no spaces. Iā€™m using google translate and he added spaces :smiley: \n\r

1 Like

Super, thank you, it works:)

In a textbox if I type the lines ...

one two three
four five
six

and then load a Listview replacing all spaces in the text with \n, I correctly get displayed ...

one
two
three
four
five six

in the listview. However, what I expected to be an array with six entries usable in a "for x=1 to n" loop, is in fact a single entry with "(one two three four five six)" with linefeeds embedded. I need a six entry array to result. Do you have any pointers that might help me?

five
six

sorry

Two ways:

  1. comma separated list (row)

image

  1. newline separated list (table)

image

Is this what you need ?

To get a list, use one of the text split blocks.
There's a powerful new split block that lets you specify a list of possible delimiter characters,
in this case blank and \n. Beware that your text block with the blank hasn't been trimmed to nothing.

The second way looks closer to what I'm attempting to do. I'll give it a go. I'm very grateful for your help. All a bit new to me, but I'm enjoying it.

Many thanks

I used the replace to replace spaces by \n. While it looks ok in Listview, internally the list is represented by a single element in brackets "(one two three four five six)". The subsequent for x=1 to n never got past 2 and I couldn't figure out why.

This should do it:

image

Brilliant, that will do it I think, thanks very much.