Log In  

Cart #todo-0 | 2024-03-18 | Embed ▽ | License: CC4-BY-NC-SA
22

A simple to-do list app for Picotron! Use this to help keep track of what you're working on. :)

P#143721 2024-03-18 17:04

Pretty neat!
I was looking through the source and I see that sometimes you call stuff with a ?, like in ?(store....)

What does the ? do in your code? I'm unfamiliar with that.

P#143824 2024-03-19 13:01
1

@profpatonildo
?from the lua manual: an interrogation mark '?' means that we cannot know how many elements the function pops/pushes by looking only at its arguments.

store is in the API.

P#143936 2024-03-20 08:39
1

This was a really nice example on how to make windowed tools! Where did you find the information on how to do this?

Also a little tip to shorten the code for todo/done toggle..
list[i][2] = not list[i][2]

Here's a little caret to the text input as well:
x = print(name[1],6,16,12)
line(x, 16, x, 23, 30)

P#143989 2024-03-20 21:31

@farvardin thank you for the explanation!

P#144120 2024-03-22 09:16
2

@profpatonildo ? is also a shorthand for the print function in both Pico-8 and Picotron. So instead of typing print("hello, Picotron!") or print(#my_array) to get the length of an array you could just type ?"hello, Picotron!" or ?#my_array.

P#144134 2024-03-22 12:20

@phaselock.studio that's a neat trick! Thank you!

P#144154 2024-03-22 19:05

[Please log in to post a comment]