Source language: Translate to:

StrParse Malfunction? I've never seen this...

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

StrParse Malfunction? I've never seen this...

Postby TMcD » Thu Dec 18, 2014 8:34 pm

I've never seen this before (see image via URL):

http://screencast.com/t/tibPTRWVy

I'm using [#10] as my delimiter. I've just never seen it skip numbering in the array. ???


* NeoBook version 5.8.5b


Update 1:

I haven't got to checking this out, but I'm thinking there are some single lines of [#10] so it counts it as a delimiter and increments the count.... But why wouldn't it show all numbers and at least "" (blank) as to what was there. Make sense?

Update 2:

The scenario mentioned in "Update 1" was the issue. All resolved now. Gonna Keep post here for anyone in the future. :)
TMcD
 
Posts: 237
Joined: Sun Apr 10, 2005 11:20 am

Re: StrParse Malfunction? I've never seen this...

Postby Gaev » Fri Dec 19, 2014 6:32 am

TMcD:

If you have a string like ...
Code: Select all
a[#10]b[#10]c[#10][#10]x[#10]y

... and you StrParse it on [%10] ... it assigns the following values ...
Code: Select all
[Item1] = a
[Item2] = b
[Item3] = c
[Item4] = blank (a.k.a nothing or null)
[Item5] = x
[Item6] = y

... but since NeoBook treats a variable with a null value ([Item4] above) as "a request to delete/remove it from the Variable Space", would you not see it (in the Debugger).
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: StrParse Malfunction? I've never seen this...

Postby MiNeoBook » Fri Dec 19, 2014 10:44 am

The response is similar with this, I think is correct (ARRAY)
setvar "[a1]" "1-Hola"
setvar "[a2]" "2-Hola"
setvar "[a3]" ""
setvar "[a4]" "4-Hola"
setvar "[a5]" "5-Hola"
MiNeoBook
 
Posts: 7
Joined: Mon Dec 08, 2014 9:40 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: dglojnar and 1 guest