Watcher removes leading zeros

I have an issue with a watcher being a bit too clever and removing leading zeros
image

it just does it to zeros

image

I was using this in a project with binary numbers and I thought my padding custom block wasn't working properly - I can mitigate against it but just highlighting an issue

I see no problem.
A leading/ending zero is useless!

Maybe read the entire post before replying.

But even in binary you shouldn't put 0s in front of numbers!

That's needlessly prescriptive. For example, if I want iTunes to sort my albums chronologically within an artist, I can start the album names with a number:

1 Give Me Take You
2 Duncan Browne
3 Streets of Fire
4 Wild Places

but if the artist has ten or more albums, that won't work unless I use leading zeros for the first nine:

01 Please Please Me
02 With the Beatles
03 A Hard Day's Night
04 Beatles for Sale
05 Help!
06 Rubber Soul
07 Revolver
08 Sgt. Pepper's Lonely Hearts Club Band
09 Magical Mystery Tour
10 The Beatles
11 Yellow Submarine
12 Abbey Road
13 Let It Be

(Syntax coloring is all a bad idea.)

(Yes I know you can teach the iPod to sort by date, but long before the iPad I had a Creative NOMAD Jukebox which could only sort ASCIIbetically.)

Well I found out you can remove the syntax highlighting by first wrapping the text in three backticks, and then adding the word "text" after the first triad of backticks.

```text
...
```

Ooh! Cool, thanks.

(But syntax coloring is still all a bad idea.) :~P

I think this is probably the code (for a WatcherMorph) that is causing both this issue and my other one with the rounding errors for large numbers

image

So that's a string not a number.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.