1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

c++ special mathematical symbols.

Discussion in 'Programming & Webmastering' started by de.das.dude, Nov 5, 2013.

  1. de.das.dude

    de.das.dude Pro Indian Modder

    Joined:
    Jun 13, 2010
    Messages:
    7,917 (4.79/day)
    Thanks Received:
    2,121
    Is there a way to declare variables as special characters like "theta", " beta" etc?
    i need to use a temp difference in my program and it would be awesome if i could use theta symbol.

    thanks!
     
  2. hellrazor

    hellrazor

    Joined:
    Feb 18, 2010
    Messages:
    1,581 (0.89/day)
    Thanks Received:
    319
    Nope.
     
  3. caleb

    Joined:
    Sep 15, 2004
    Messages:
    1,553 (0.41/day)
    Thanks Received:
    206
    Location:
    Poland,Slask
    imagine that integers are those symbols and write a layer for it :)
     
  4. de.das.dude

    de.das.dude Pro Indian Modder

    Joined:
    Jun 13, 2010
    Messages:
    7,917 (4.79/day)
    Thanks Received:
    2,121
    layer?
    lol. all the c++ i learnt was in high school.
    you have to explain like you are explaining to a mechanical engineering student XD
     
  5. Fourstaff

    Fourstaff Moderator Staff Member

    Joined:
    Nov 29, 2009
    Messages:
    9,212 (4.98/day)
    Thanks Received:
    1,995
    Location:
    Home
    Nope, you will have to spell them out.
     
    de.das.dude says thanks.
  6. Steevo

    Steevo

    Joined:
    Nov 4, 2005
    Messages:
    8,547 (2.56/day)
    Thanks Received:
    1,314
    de.das.dude says thanks.
    10 Million points folded for TPU
  7. Fourstaff

    Fourstaff Moderator Staff Member

    Joined:
    Nov 29, 2009
    Messages:
    9,212 (4.98/day)
    Thanks Received:
    1,995
    Location:
    Home
  8. de.das.dude

    de.das.dude Pro Indian Modder

    Joined:
    Jun 13, 2010
    Messages:
    7,917 (4.79/day)
    Thanks Received:
    2,121
    i just spelled them out for now :)
     
  9. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    14,110 (6.24/day)
    Thanks Received:
    3,929
    Location:
    IA, USA
    de.das.dude says thanks.
    Crunching for Team TPU
  10. alexstone New Member

    Joined:
    Nov 4, 2013
    Messages:
    18 (0.04/day)
    Thanks Received:
    0
    Everything you need are already existing include <math.h>
     
  11. Aquinus

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    6,867 (6.48/day)
    Thanks Received:
    2,469
    Location:
    Concord, NH
    This is C, not MatLab! Just spell out your variable names or shorten them. I'm pretty sure that it won't take kindly to using UTF-8/Extended ASCII chars for variable names.

    Edit: I should add that using symbols doesn't make it easier to read or manipulate your code. Keep it simple and don't overthink it.
     
  12. BiggieShady

    BiggieShady

    Joined:
    Feb 8, 2012
    Messages:
    1,042 (0.99/day)
    Thanks Received:
    363
    Location:
    Zagreb, Croatia
    Single letter variables make a lot of sense in math given how multiplication has a short notation (when multiplication operator is omitted).
    For use in programming languages it's preferable to have descriptive variable names.
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page