Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Some functions in Codea

edited August 2012 in Questions Posts: 18

Hi, are there any pause function or wait ?
Or an function who return how many characters are in a chain ?
And can I "cut" an chain to place each characters in a part of a table ?
Tanks ,

Comments

  • Posts: 384

    Hi @eloi67, there is no pause function because the paradigm of this platform is different to many you may have used. Instead of getting the iPad to do nothing for x seconds, use the draw loop to check whether x seconds has elapsed, and then do what you need to do. There have been other threads about this - look for state machine.

    The # sign can be used to count characters in a string:

    print("The number of characters in stringVariable:  " .. #stringVariable)
    

    And yes, you can assign table elements as you say, but there are no nifty functions to do this built in, so you will have to write your own or find one on the web.

Sign In or Register to comment.