× Register Login What's New! Contact us
Results 1 to 7 of 7
  1. #1
    cinnamonrolls1's Avatar
    Join Date
    May 2017
    Gender
    Female
    Religion
    Islam
    Posts
    1,156
    Threads
    57
    Reputation
    1796
    Rep Power
    17
    Likes (Given)
    1385
    Likes (Received)
    612

    Any folk here who know computing stuff?

    Report bad ads?

    Salams all, im revising for a coursework thing in computing that counts for 30% of my final grade and i have to do by myself in class under test conditions with basically no help. I was wondering if someone could basically explain to me what it means to declare a variable in programming? I dont really get what the point of the declaration is apart from it basically identifying that a variable is gonna come next. Also does anyone here have any knowledge of visual basic( version 6.0)?
    Sorry for the long questions!
    Thank you, jazakallah khairan

  2. Report bad ads?
  3. #2
    cinnamonrolls1's Avatar
    Join Date
    May 2017
    Gender
    Female
    Religion
    Islam
    Posts
    1,156
    Threads
    57
    Reputation
    1796
    Rep Power
    17
    Likes (Given)
    1385
    Likes (Received)
    612

    Re: Any folk here who know computing stuff?

    Quote Originally Posted by cinnamonrolls1 View Post
    Salams all, im revising for a coursework thing in computing that counts for 30% of my final grade and i have to do by myself in class under test conditions with basically no help. I was wondering if someone could basically explain to me what it means to declare a variable in programming? I dont really get what the point of the declaration is apart from it basically identifying that a variable is gonna come next. Also does anyone here have any knowledge of visual basic( version 6.0)?
    Sorry for the long questions!
    Thank you, jazakallah khairan
    Also( sorry!) what is an array like how does it work?

  4. #3
    Zzz_'s Avatar
    Join Date
    Jul 2017
    Gender
    Male
    Religion
    Islam
    Posts
    542
    Threads
    12
    Reputation
    1108
    Rep Power
    0
    Likes (Given)
    228
    Likes (Received)
    281

    Re: Any folk here who know computing stuff?

    wa'alaikum as'salaam

    VB is so old school, who teaches that anymore? even in HS these days, students are taught programming with java or some open source language.

    Declaring a variable reserves a name and some space in memory for a variable of the specified type, but doesn't give it a value. Initializing gives the variable a value. Depending on how you're going to use the variable, you can declare it without initializing it and then initialize it later, or declare and initialize at the same time.

    For example:

    // declares integer variable
    Dim num1 As Integer


    // initializes integer variable that's already been declared
    num1 = 6;

    // declares and initializes integer variable at the same time
    Dim num1 As Integer = 5;


    Stack over flow is a great resource for programing questions.

    https://stackoverflow.com/



    An array is a list of items, a bit like a shopping list. It allows you to store more than one item in only one variable.Think of it like this. When writing your shopping list, you could use a separate piece of paper for each item you need to buy (a variable). However this is silly and unneeded—could you imagine how hard it would be to carry all that paper around with you? So, you use one piece of paper for all of your items. This one piece of paper is your array.

    Youtube is a good resource also for tutorials on this stuff.

    here's a video on arrays: https://www.youtube.com/watch?v=gKiNGZMuqI0
    | Likes 00001001, cinnamonrolls1, SHO liked this post

  5. #4
    00001001's Avatar
    Join Date
    Nov 2016
    Location
    Amsterdam
    Gender
    Male
    Religion
    Islam
    Posts
    92
    Threads
    10
    Reputation
    135
    Rep Power
    18
    Likes (Given)
    44
    Likes (Received)
    33

    Re: Any folk here who know computing stuff?

    Like the brother said, stackoverflow is the best website if you need help with debugging.

    Here is an example of an array of a program I was working on, just today:

    float[] weekYAxisCoordinates = {0.85f, 0.6875f, 0.525f, 0.3625f, 0.20f};
    This is in Java btw, anyway. The reason why you would want to use an Array, is because it is easy to manipulate. Example (simplified):

    for(int i = 0; i < weekYAxisCoordinates.length; i++) {
    Log.d(weekYAxisCoordinates[i])
    }
    So, what this does is simply print/log the values you see in the array. This would be impossible if you had put them all in seperate variables.


    Edit:
    It is also important to know what your goal is. There are different languages for different platforms.

    Website: HTML, CSS, JavaScript, PHP, MySQL
    Android: Java (though Java can be used almost on any device)
    etc. etc.
    Last edited by 00001001; 03-08-2018 at 01:22 AM.
    | Likes Zzz_, cinnamonrolls1 liked this post

  6. Report bad ads?
  7. #5
    cinnamonrolls1's Avatar
    Join Date
    May 2017
    Gender
    Female
    Religion
    Islam
    Posts
    1,156
    Threads
    57
    Reputation
    1796
    Rep Power
    17
    Likes (Given)
    1385
    Likes (Received)
    612

    Re: Any folk here who know computing stuff?

    Sorry for the late reply, i just saw yall had replied now but thank you all so much!! Yeah im not a VB fan but my school uses it( idk why tbh, id prefer Javascript or python) thank you all again!

  8. #6
    SHO's Avatar
    Join Date
    Apr 2016
    Location
    http://www.islamicboard.com/
    Gender
    Male
    Religion
    Islam
    Posts
    52
    Threads
    6
    Reputation
    87
    Rep Power
    22
    Likes (Given)
    141
    Likes (Received)
    27

    Re: Any folk here who know computing stuff?

    AsSalamu 'Alaykum
    Quote Originally Posted by cinnamonrolls1 View Post
    I was wondering if someone could basically explain to me what it means to declare a variable in programming? I dont really get what the point of the declaration is apart from it basically identifying that a variable is gonna come next.
    Declaring a variable is like dedicating a space in memory where you can store a value.You might be able to recognize variables,but computers don't.So you must declare them.
    More: The Memory game-Intro to variables in Java (vid)
    Quote Originally Posted by cinnamonrolls1 View Post
    Also( sorry!) what is an array like how does it work?
    Collection/group of similar type of data elements.Often used instead of declaring multiple variables often useful while using loops.
    More: Arrays in C++
    Quote Originally Posted by cinnamonrolls1 View Post
    id prefer Javascript or python
    JavaScript: Video Lessons , Practice
    Python: Video Lessons , Practice

    Udacity and Codecademy are very good sites to learn programming(Basics).
    Also, StackOverflow is a forum(QA Site) for programmers.(But I warn you that their rules are annoying).

    Hope it helps.
    | Likes cinnamonrolls1 liked this post

  9. #7
    cinnamonrolls1's Avatar
    Join Date
    May 2017
    Gender
    Female
    Religion
    Islam
    Posts
    1,156
    Threads
    57
    Reputation
    1796
    Rep Power
    17
    Likes (Given)
    1385
    Likes (Received)
    612

    Re: Any folk here who know computing stuff?

    Quote Originally Posted by SHO View Post
    AsSalamu 'Alaykum

    Declaring a variable is like dedicating a space in memory where you can store a value.You might be able to recognize variables,but computers don't.So you must declare them.
    More: The Memory game-Intro to variables in Java (vid)

    Collection/group of similar type of data elements.Often used instead of declaring multiple variables often useful while using loops.
    More: Arrays in C++

    JavaScript: Video Lessons , Practice
    Python: Video Lessons , Practice

    Udacity and Codecademy are very good sites to learn programming(Basics).
    Also, StackOverflow is a forum(QA Site) for programmers.(But I warn you that their rules are annoying).

    Hope it helps.
    Thank you! Jazakhallah khairan
    | Likes SHO liked this post


  10. Hide
Hey there! Any folk here who know computing stuff? Looks like you're enjoying the discussion, but you're not signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off. You also get notifications, here and via email, whenever new posts are made. And you can like posts and share your thoughts. Any folk here who know computing stuff?
Sign Up

Similar Threads

  1. Something for Married folk!
    By - Qatada - in forum Miscellaneous
    Replies: 10
    Last Post: 08-05-2009, 03:13 PM
  2. Computing language
    By nebula in forum Education Issues
    Replies: 16
    Last Post: 04-26-2009, 09:23 PM
  3. Computing
    By jannat in forum Education Issues
    Replies: 27
    Last Post: 05-13-2007, 11:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
create