Jump to content

Is it okay to use other datatypes as in keys for a map?


Recommended Posts

Hello! I was wonder if it OK for me to use datatypes other than strings & integers... I tested it and it works! But the help file states: (Beta Helpfile -> AutoIt -> Language Reference -> Variables)

Quote

...An element can only be accessed by a key, which can be either a string or an integer.

So yeah, will I able to continue using other datatypes normally even in the future releases of AutoIt?

 

Thanks in Advance! TD :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Oh :o, Thanks! :D

 

This script conforms it :):

#include <MsgBoxConstants.au3>

Local $mMap[]

$mMap[1] = "Element with 1 as the key"

MsgBox($MB_OK, "Test", $mMap[1.5]) ; Because Int(1.5) = 1

 

TD :thumbsup:

P.S It would be nice if it was true... :P

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...