Jump to content
alberto72

Checking Type of Variable

Recommended Posts

Why

import vs
number = "123"
vs.Message("Type=", type (number) )

returns : "Types =" instead of "Types =int"  ?

Thanks

Edited by alberto72

Share this post


Link to post

by putting 123 in quotes you are telling python to regard it as a string.

 

Also for the message dialog I believe you have to convert  to string so this code should work:

import vs
number = 123
vs.Message("Type=" + str(type (number)))

 

Share this post


Link to post

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

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×