Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
strings initialized?
#6
boriel Wrote:What version do you have?? Please, download latest one

I had dowloaded 1.2.6r1603c some days ago, but I've just realized I hadn't updated the symbolic link to it!, so I was still using 1.2.6r1603b. Anyway I tried both, and the program crashes with both.

I have just downloaded the last development version in the archive (1.2.6r1603e) and the program frozes after printing a different string, in fact a whole string array (that happened some hours ago with 1.2.6r1603b).

The problematic function (the same I mentioned before) is:

Code:
function strings(times as ubyte, text as string ) as string

    dim i as ubyte
    dim result as string
    let result="" ' NEEDED, OR BOOM :)
    for i = 1 to times
        let result = result + text
    next i
    return result

end function

And the sub that calls it is the following:

Code:
sub wcls()

    ' Clear the text window.

    ' 2010-06-17 First draft.

    dim l as ubyte
    for l=lastLine to firstLine step -1
        print at l,firstCol;strings(winWidth," ")
        ' print at l,firstCol;"                              " ' winWidth spaces, TEMPORARY ALTERNATIVE, anyway a bit faster
    next l
    home()

end sub


And:

Code:
const firstCol as ubyte = 1
const lastCol as ubyte = 30
#define winWidth lastCol-firstCol+1

Don't worry, it's not important.It will be solved by time Smile
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)