swift - Array Name being described as a String -


i have multiple arrays , want choose 1 main array. want main array described string. how can name new array using stationid string , directionid string?

    let farbhof1 = ["hi","some","strings"]      var stationid = "farbhof"     var directionid = "1"  destviewcontroller.tableviewarray = "\(stationid)\(directionid)" 

you cannot in swift. variable names need known @ compile time, cannot calculated @ runtime.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -