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,476 (5.01/day)
    Thanks Received:
    1,936
    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,569 (0.98/day)
    Thanks Received:
    315
    Nope.
  3. caleb

    Joined:
    Sep 15, 2004
    Messages:
    1,537 (0.43/day)
    Thanks Received:
    204
    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,476 (5.01/day)
    Thanks Received:
    1,936
    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,154 (5.43/day)
    Thanks Received:
    1,959
    Location:
    Home
    Nope, you will have to spell them out.
    de.das.dude says thanks.
  6. Steevo

    Steevo

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

    Fourstaff Moderator Staff Member

    Joined:
    Nov 29, 2009
    Messages:
    9,154 (5.43/day)
    Thanks Received:
    1,959
    Location:
    Home
  8. de.das.dude

    de.das.dude Pro Indian Modder

    Joined:
    Jun 13, 2010
    Messages:
    7,476 (5.01/day)
    Thanks Received:
    1,936
    i just spelled them out for now :)
  9. FordGT90Concept

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

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

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

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    5,888 (6.56/day)
    Thanks Received:
    1,888
    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:
    929 (1.05/day)
    Thanks Received:
    305
    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