QUOTE(dr_zoidberg @ Nov 6 2011, 01:09 AM)
why mmu, good benefits?University Multimedia University Thread V3, For any problems and discussions
University Multimedia University Thread V3, For any problems and discussions
|
|
Nov 6 2011, 01:11 AM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
All Stars
26,524 posts Joined: Jan 2003 |
|
|
|
|
|
|
Nov 6 2011, 01:11 AM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
How it might differ??
|
|
|
Nov 6 2011, 01:13 AM
|
![]() ![]()
Junior Member
107 posts Joined: Aug 2010 |
|
|
|
Nov 6 2011, 01:15 AM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
All Stars
26,524 posts Joined: Jan 2003 |
|
|
|
Nov 6 2011, 01:16 AM
|
![]() ![]()
Junior Member
107 posts Joined: Aug 2010 |
|
|
|
Nov 6 2011, 01:19 AM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
All Stars
26,524 posts Joined: Jan 2003 |
|
|
|
|
|
|
Nov 6 2011, 01:28 AM
|
|
Elite
4,619 posts Joined: Jul 2011 |
QUOTE(kailoonthedog @ Nov 6 2011, 01:11 AM) For example, CODE #include <iostream> void output(){ std::cout << var; } int main(){ int var = 111; output(); return 0; } vs CODE <?php function output(){ echo $var; } function main(){ $var = 111; } main(); output(); ?> In the c++ code, obviously it won't even compile because variable var has not been initialized yet. If you throw it below main, then it'll still won't compile since there is no function called output. It gives you a feel of encapsulation, even though you're still coding in procedural style. Meanwhile, in the PHP code, it will run no matter how you change the orders of the functions. Another difference would be adding several variables with arrays into a bigger array. How to do that in c++(not that we can't, but we need more work to do it as compared with PHP). In php, its relatively easy. And quite a lot of other things as well, such as the question that you just asked me. We don't handle the internals in PHP(unless you're going hardcore), while you have to go deeper in c++(pointers). |
|
|
Nov 6 2011, 09:52 AM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
Yeah pointer , but the evolution of PHP not only make it become a web application language but also it can be use to compile into a standalone console program(before that when it's used in creating web application it's a interpreted language).
|
|
|
Nov 6 2011, 10:02 AM
|
|
Elite
4,619 posts Joined: Jul 2011 |
QUOTE(kailoonthedog @ Nov 6 2011, 09:52 AM) Yeah pointer , but the evolution of PHP not only make it become a web application language but also it can be use to compile into a standalone console program(before that when it's used in creating web application it's a interpreted language). Even in php cli, you still don't need to handle much. But what I meant is not whether its a console apps or not. What I meant is the programming logic. It differs even though most style n syntax is derived from c/c++. Example, If you want to merge several variables with several data types into 1 variable, its not possible in c++, while its possible in php since the data will be autotype casted to its respective datatype.p/s: The problem of from an easier language to a much harder language |
|
|
Nov 6 2011, 02:57 PM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
You're trying to say it's a weakly typed language = =
Added on November 6, 2011, 2:57 pmand also implicit data type conversion This post has been edited by kailoonthedog: Nov 6 2011, 02:57 PM |
|
|
Nov 6 2011, 03:04 PM
|
|
Elite
4,619 posts Joined: Jul 2011 |
QUOTE(kailoonthedog @ Nov 6 2011, 02:57 PM) You're trying to say it's a weakly typed language = = yeah. but still type casting what Added on November 6, 2011, 2:57 pmand also implicit data type conversion This post has been edited by wcypierre: Nov 6 2011, 03:04 PM |
|
|
Nov 6 2011, 06:25 PM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
hmm??I thought just declare it , after that it's to your mean to put whatever type of value into it , and later on you can reassign it to another type?
|
|
|
Nov 6 2011, 07:29 PM
|
|
Elite
4,619 posts Joined: Jul 2011 |
QUOTE(kailoonthedog @ Nov 6 2011, 06:25 PM) hmm??I thought just declare it , after that it's to your mean to put whatever type of value into it , and later on you can reassign it to another type? Of course not. That one I still know how to do.char var; cout << int(var); I mean something nearly like this: int var1; char var2; string var 3; bool var 4; Try and combine these into 1 variable |
|
|
|
|
|
Nov 6 2011, 08:29 PM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
type casting should be "(int) variable " zzzz , anyway what do you mean by combining all??
Added on November 6, 2011, 8:39 pmeach variable declaraction should be specify by the type because compiler need to know what will be store in that portion of memory and the size of memory can be determine and allocateed to respective type.Even if you use array it only create an adjacent of memory with only one type.The only way of grouping string , integer floating point etc is to use structure.That is CODE struct example { int num; // everything inside curly braces is the structure member float value; string name; char arr[20]; }; and can be used using CODE example FirstInput = { 20 , // initialization. 1.2 , "kailoontedog" , "handsome" }; and it can be access using CODE cout << FirstInput.num << endl << FirstInput.value << endl<<FirstInput.name << endl << FirstInput.arr << endl; This post has been edited by kailoonthedog: Nov 6 2011, 08:39 PM |
|
|
Nov 6 2011, 08:48 PM
|
|
Elite
4,619 posts Joined: Jul 2011 |
It IS typecasting. when did I said no? Yeah, structure is a valid method. But I think you didn't get my question from the beginning.
|
|
|
Nov 6 2011, 09:56 PM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
What is your question can ellaborate more??
|
|
|
Nov 6 2011, 11:43 PM
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
All Stars
26,524 posts Joined: Jan 2003 |
any engineering students here..let's discuss calculus
|
|
|
Nov 7 2011, 12:03 AM
|
|
Elite
4,619 posts Joined: Jul 2011 |
QUOTE(kailoonthedog @ Nov 6 2011, 09:56 PM) Just assume that I never asked.QUOTE(Human Nature @ Nov 6 2011, 11:43 PM) Not Engineering student, but discuss about what chapter eh? I want to improve my calculus also |
|
|
Nov 7 2011, 12:17 AM
|
![]() ![]()
Junior Member
107 posts Joined: Aug 2010 |
QUOTE(Human Nature @ Nov 6 2011, 01:19 AM) I'm not in IT, but I'm in Engineering for now.QUOTE(Human Nature @ Nov 6 2011, 11:43 PM) Calculus... not easy. During undergrad days had to understand Fourier transforms and the others. And then, had to learn Wavelet and image processing by myself. |
|
|
Nov 7 2011, 12:49 AM
|
![]() ![]() ![]() ![]() ![]()
Senior Member
864 posts Joined: Apr 2006 From: Earth |
Hi guys. Anyone know where is the gym in Cyberjaya campus? I can't seem to find it. They say it's near the badminton hall, but I can't that one as well! I can only find the swimming pool.
|
|
Topic ClosedOptions
|
| Change to: | 0.0192sec
0.26
6 queries
GZIP Disabled
Time is now: 6th December 2025 - 01:08 PM |