Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Real Number Variables (# / $)

Author
Message
Heldex
3
Years of Service
User Offline
Joined: 27th Mar 2016
Location:
Posted: 27th Mar 2016 11:23
I have been reading the "Help" document that comes with AppGameKit and havent quite found a definite answer to my question.

As i was reading the "Data Types, Variables and Arrays" section, I found that attaching # to the end of a integer or $ to the end of a string is considered a "Real Variable".

So my question is, what function or purpose do "Real Variables" serve that differs from regular integers or strings?
=PRoF=
16
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 30th Mar 2016 13:44
An integer is a whole number, e.g. 1, 42, 256; and can range from -2 billion to +2 billion (or so). They are represented in AppGameKit by using a word. e.g. score = 0;

A real number (or float) is one which has decimal places. e.g. 0.01, 3.141, 256.7; These are represented in AppGameKit by using a word with a # at the end. e.g. pi# = 3.141, playerx#=55.7;

A string is a variable which holds text rather than numbers (whole or otherwise), e.g. Hello, fish, super-duper; These are represented in AppGameKit by using a word with a $ at the end. e.g playername$="Dave";


I hope that helps.
Heldex
3
Years of Service
User Offline
Joined: 27th Mar 2016
Location:
Posted: 30th Mar 2016 14:38
I understand now,

I appreciate the response.

Login to post a reply

Server time is: 2019-11-17 15:27:04
Your offset time is: 2019-11-17 15:27:04