Closed BharatAtbrat closed 3 months ago
Let me know if conditional logic for checking valid coordinates is okay. If I've understood correctly try_parse returns true and false depending on whether the value can be parsed into float.
That's right, but it also performs the parsing (if it is posible)! To do that, you need to pass a float variable as out
parameter, which means that the method will assign that variable a value (the parsed value) after being called. Take a look at the parameter directions section of the Vala Tutorial for more information: https://wiki.gnome.org/Projects/Vala/Tutorial#Parameter_Directions
Added Vala code for Map demo
Let me know if conditional logic for checking valid coordinates is okay. If I've understood correctly
try_parse
returns true and false depending on whether the value can be parsed intofloat
.I would appreciate any other changes/ improvements :)