Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Import Macro Repair

...

Panel

...

...

bgColor#ffffff
titleQ

Do variables need a data type?

...

...

Panel

...

...

bgColor#ffffff
titleA

If an assignment do create a variable, the variable gets implicitly the data type based on the value that has been assigned. It is also possible that avariable is changing its data type with the next assignment.

...

...

Example code:

...

...

mystring = “Hello“ -- is of type

...

 string
mynumber = 5 -- is of type

...

 number
dynvar = 5 -- is of type number

...

 now
dynvar = “Hello“ -- is of type

...

 string now
Panel
bgColor#ffffff
titleSee also...

Filter by label (Content by label)
showLabelsfalse
spaces@self
showSpacefalse
operatorAND
cqllabel = "netscript" and label = "variable" and space = currentSpace ( )

...

...

labels

...

netscript variable