Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 10-06-2004, 06:08 PM   #1 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
what does this mean?

Code:
float square(int x)
Androto is offline   Reply With Quote
Old 10-06-2004, 06:25 PM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
A function called "square". It wants an integer value and returns after done a floating point value. So basically you could do this:
float val = square(5);
__________________
Valmont is offline   Reply With Quote
Old 10-06-2004, 06:28 PM   #3 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
would i also be able to do this:
Code:
 float square;
sqaure = int x;
Androto is offline   Reply With Quote
Old 10-06-2004, 06:32 PM   #4 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
a floating point is a number than can either be a whole number or a decimal, right?
Androto is offline   Reply With Quote
Old 10-06-2004, 07:10 PM   #5 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Quote:
Originally posted by Androto
would i also be able to do this:
Code:
 float square;
sqaure = int x;
No, this specific code is illegal. But your thought is good:
Code:
int x(0);
float a = x;
__________________
Valmont is offline   Reply With Quote
Old 10-06-2004, 07:12 PM   #6 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
ok
Androto is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 06:03 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting