Liz Lamperouge
Liz Lamperouge

Reputation: 691

Netlogo print values and text in the same line

I know how to print a variable and a text but I want to make it in the same line, If i Use:

print "text" MYVARIABLE 

I got an exception

Expected command

So the question is: there is a way to print text and variable on the same line? Thank you

Upvotes: 1

Views: 2757

Answers (1)

Luke C
Luke C

Reputation: 10301

Yes! The word primitive is what you are after- see the dictionary definition here.

In brief, you can follow the syntax:

print word "Count turtles: " count turtles

Or

print ( word "There are " count turtles " turtles right now" )

Upvotes: 5

Related Questions