Questions tagged [dollar-sign]

Anything related to the dollar symbol `$` and its special meanings in programming. The dollar symbol is often used in various programming languages as a special symbol for various purposes.

Anything related to the dollar symbol $ and its special meanings in programming. The dollar symbol is often used in various programming languages as a special symbol for various purposes.

For example, the dollar symbol has special meaning in:

  • most flavors of regular expressions
  • PHP language
  • R language
  • some Basic dialects
  • BASH shell language
  • assembly language
  • makefiles language
  • TCL language
  • etc.
199 questions
8
votes
1 answer

What is the dollar-sign prefix in function arguments used for in Julia?

When I searched about the '$' prefix in Julia, all I could find is that it is for string or expression interpolation. For example, here https://docs.julialang.org/en/v1/base/punctuation/. However, I have seen people' code like add_broadcast!($y_d,…
user2727768
  • 666
  • 1
  • 7
  • 12
7
votes
2 answers

Currency Formatting Canadian English and French

I have a requirement to set the value based on the locale. I will get the locale either en_US or fr_FR String locale = object.getLocale(); // Then based on the locale I need to define the currency. The currency format I need is defined under. …
Some Java Guy
  • 4,992
  • 19
  • 71
  • 108
7
votes
6 answers

What is the difference between webkit's `$$` return and jQuery `$` return?

If in a webkit browser like Chrome i do: $$('span'); I get a result that looks almost exactly the same as jQuery's: $('span'); If in the console I look for definition of $$ I get: bound: function () { return…
Naftali
  • 144,921
  • 39
  • 244
  • 303
7
votes
1 answer

Why is $ allowed but $$, or <$> disallowed as an operator (FS0035) and what makes $ special?

$ is allowed in a custom operator, but if you try to use $$, <$> or for instance ~$% as operator name you will receive the following error: error FS0035: This construct is deprecated: '$' is not permitted as a character in operator names and is…
Abel
  • 56,041
  • 24
  • 146
  • 247
7
votes
3 answers

Will using a preprocessor directive to define what a dollar sign represents cause any conflicts?

Can I use the following in C++?: #define $ cout int main(){ $<<"Hello World!\n"; return 0; } I'm wondering whether it will cause any conflicts.
Somnium
  • 1,059
  • 1
  • 9
  • 34
6
votes
1 answer

Matplotlib Display Dollar Signs in Tick Labels (Strings)

I can't figure out how to display dollar signs in tick labels that are not numbers, but strings. Here's an example of what I mean: import matplotlib.pyplot as plt import numpy as np categories = ['$0-$10','$10-$20','$20-$30'] y_pos =…
Dance Party2
  • 7,214
  • 17
  • 59
  • 106
5
votes
1 answer

Meaning of Dollar Sign & Curly Braces Containing Javascript Block Outside of HTML Script Tag

I'm currently reading 'Javascript Web Applications' (O'Reilly, Alex MacCaw) and very early on there's a code snippet which might appear to execute a JS function, within an HTML document, yet it is not enclosed by