Page 1 of 1

How do i call a specific list's element ?

Posted: Tue Jun 04, 2013 11:43 am
by Primoz128

Code: Select all

NewList key$()
AddElement( key$() )
  key$() = "game maker"
AddElement( key$() )
  key$() = "pure basic"
AddElement( key$() )
  key$() = "workout"

NewMap response$()
response$("game maker") = "game maker response string"
response$("pure basic") = "pure basic response string"
response$("workout") = "workout response string"

; Now we gota also give new options... another map
ForEach key$()
  Debug key$()
Next

Debug response$( key$() ) ; Here i tried to insert this instead: key(1), but it errors... idk what to do
Well i do not know how to access specific list's element...

(ALSO: is there anyone that is willing to help from time to time on skype ? Forums sometimes don't answer a question)

Re: How do i call a specific list's element ?

Posted: Tue Jun 04, 2013 11:58 am
by luis
http://www.purebasic.com/documentation/ ... ement.html

Code: Select all

SelectElement(key$(), 0)
Debug response$( key$() )

Re: How do i call a specific list's element ?

Posted: Tue Jun 04, 2013 2:14 pm
by Primoz128
Thanks a lot ^^. Seems like i completely forgot about this.

Re: How do i call a specific list's element ?

Posted: Tue Jun 04, 2013 2:17 pm
by skywalk

Re: How do i call a specific list's element ?

Posted: Wed Jun 05, 2013 7:33 am
by Primoz128
No i need a combination.