Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › /= as Not Equal Equality.
New Posts  All Forums:Forum Nav:

/= as Not Equal Equality.

post #1 of 8
Thread Starter 
I was wondering as I was in a discussion with a friend the other day that a /= is equivalent to a != equality.
Now is there any language that uses the /= as a not equal equality.
Unraid Server
(17 items)
 
2017 rMBP
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel® Xeon® CPU E5-2630 v3 @ 2.40GHz ASRock - X99 Extreme4 HD7950 VT-d to Windows 10 VM 12GB DDR4 ECC PC4-17000 
Hard DriveHard DriveHard DriveCooling
PNY CS1211 480GB Hitachi 2TB 7K2000 x2 Hitachi 3TB 7K3000 x4 Coolermaster Hyper 212 
OSMonitorPowerCase
Unraid Server Pro Acer H236HL + ASUS VG248QE Corsair AX860i Corsair 500R White 
Other
Mellanox ConnectX-2 10GBPs SFP 
CPUMotherboardGraphicsRAM
Core i7 (I7-7820HQ) 2.9 Turbo 3.9 Apple Mainboard Radeon Pro 560  Micron 16GB LPDDR3  
Hard DriveCoolingOSMonitor
512GB SM0512G NVME Apple Dual Fan OSX High Sierra 15" 2880x1800 (1900x1200 Scaled) LED Backlit IP... 
KeyboardPowerCaseMouse
Razer Blackwidow Apple 87W/61W USB-C Power Adapter Apple Unibody Razer Deathadder 
Audio
Pioneer DDJ-SB2 
  hide details  
Reply
Unraid Server
(17 items)
 
2017 rMBP
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel® Xeon® CPU E5-2630 v3 @ 2.40GHz ASRock - X99 Extreme4 HD7950 VT-d to Windows 10 VM 12GB DDR4 ECC PC4-17000 
Hard DriveHard DriveHard DriveCooling
PNY CS1211 480GB Hitachi 2TB 7K2000 x2 Hitachi 3TB 7K3000 x4 Coolermaster Hyper 212 
OSMonitorPowerCase
Unraid Server Pro Acer H236HL + ASUS VG248QE Corsair AX860i Corsair 500R White 
Other
Mellanox ConnectX-2 10GBPs SFP 
CPUMotherboardGraphicsRAM
Core i7 (I7-7820HQ) 2.9 Turbo 3.9 Apple Mainboard Radeon Pro 560  Micron 16GB LPDDR3  
Hard DriveCoolingOSMonitor
512GB SM0512G NVME Apple Dual Fan OSX High Sierra 15" 2880x1800 (1900x1200 Scaled) LED Backlit IP... 
KeyboardPowerCaseMouse
Razer Blackwidow Apple 87W/61W USB-C Power Adapter Apple Unibody Razer Deathadder 
Audio
Pioneer DDJ-SB2 
  hide details  
Reply
post #2 of 8
Quote:
Originally Posted by linkinparkfan007 View Post

I was wondering as I was in a discussion with a friend the other day that a /= is equivalent to a != equality.
Now is there any language that uses the /= as a not equal equality.

In many languages
x = x + 1;

is directly equivalent to

x += 1;

 

In many of these same languages

x = x / 1;

is directly equivalent to

x /= 1;

 

In addition, the slash is overloaded in in several situations in general

 

That said, <> is a good choice that some languages use. If you want to use /= I would recommend a language such as lisp where you could define it easily.

post #3 of 8
There might be quite a few more, but Haskell is the first one that comes to my mind. It uses the "/=" operator for the boolean "not equals" test.
However, "!=" is used in most prevalent languages.
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
post #4 of 8
The worst use of the not operator:

'=

granted it makes sense from a formal logic perspective.
Bob's Computer
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500K MSI P67A-G45 MSI 6970 Lightning 2GB G Skill Ripjaws X (2x4GB) 1866mhz 9-10-9-28 
Hard DriveOptical DriveCoolingOS
Corsair Force 3 SSD (60GB), X1 WD5000AAKS, X1 W... ASUS DRW-24B1ST/BLK/B/AS Black SATA 24X DVD Burner Noctua NH-C14 Windows 7 64 bit 
MonitorKeyboardPowerCase
Asus VH238H Logitech G510 HALE90 750W NZXT Phantom Black 
MouseMouse PadAudioOther
Logitech G9x SteelSeries 4HD ASUS Xonar DGX / Audio-Technica ATH-AD700 Hauppauge! HVR-1250 TV Tuner 
  hide details  
Reply
Bob's Computer
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500K MSI P67A-G45 MSI 6970 Lightning 2GB G Skill Ripjaws X (2x4GB) 1866mhz 9-10-9-28 
Hard DriveOptical DriveCoolingOS
Corsair Force 3 SSD (60GB), X1 WD5000AAKS, X1 W... ASUS DRW-24B1ST/BLK/B/AS Black SATA 24X DVD Burner Noctua NH-C14 Windows 7 64 bit 
MonitorKeyboardPowerCase
Asus VH238H Logitech G510 HALE90 750W NZXT Phantom Black 
MouseMouse PadAudioOther
Logitech G9x SteelSeries 4HD ASUS Xonar DGX / Audio-Technica ATH-AD700 Hauppauge! HVR-1250 TV Tuner 
  hide details  
Reply
post #5 of 8
Personally I think != makes the most sense because you can use ! as a not operator for other uses. eg:
Code:
if (!somefunction()) {
    printf "function returned false\n";
}

As said already, / is a divide operator so prepending it to equals doesn't really make much sense from a programming stand point.
post #6 of 8
It doesn't make sense because you're regarding them as separate signs, but they're not. You're supposed to mentally overlap the slash and equals sign. /= is actually lazy man's way of typing ≠.
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
post #7 of 8
Quote:
Originally Posted by Coma View Post

It doesn't make sense because you're regarding them as separate signs, but they're not. You're supposed to mentally overlap the slash and equals sign. /= is actually lazy man's way of typing ≠.
I get that, but that's not how programming works. Programming is about having individual blocks that you link together to create an routine. Joining two operators together to create a third unrelated operator breaks that logic.

Besides, != doesn't looks that dissimilar to /= from a visual perspective. So if you're going to emulate the ≠ symbol that it makes more sense to do so with operators that individually connect that way instead of operators that individually work differently. (ie ! (not) and = (equals) work together to make not equal to. where as / (divide) and = (equals) work together to make equal a division of itself.

You have to understand that programming is computer science, not pure mathematics. So while there's understandably going to be a heavy borrowing from maths in programming, you can't expect all programming languages to use exact math notation.
post #8 of 8
Quote:
Originally Posted by Plan9 View Post

I get that, but that's not how programming works. Programming is about having individual blocks that you link together to create an routine. Joining two operators together to create a third unrelated operator breaks that logic.

Besides, != doesn't looks that dissimilar to /= from a visual perspective. So if you're going to emulate the ≠ symbol that it makes more sense to do so with operators that individually connect that way instead of operators that individually work differently. (ie ! (not) and = (equals) work together to make not equal to. where as / (divide) and = (equals) work together to make equal a division of itself.

You have to understand that programming is computer science, not pure mathematics. So while there's understandably going to be a heavy borrowing from maths in programming, you can't expect all programming languages to use exact math notation.

If they did, you wouldn't catch me programming!
Ol' Sandy
(28 items)
 
"Zeus"
(12 items)
 
Elite Preview
(6 items)
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1230v3 Gigabyte GA-Z97X-UD5H-BK MSI Gaming GTX 980 Kingston 32GB (4x8) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Beyerdynamic DT-770 Pro 250ohm Schiit Bifrost DAC Schiit Asgard 2 HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 128GB 1333MHz LSI 9271-8i 
OSPowerCase
VMware ESXi 5.5 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD Windows 10 Insider Preview 
  hide details  
Reply
Ol' Sandy
(28 items)
 
"Zeus"
(12 items)
 
Elite Preview
(6 items)
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1230v3 Gigabyte GA-Z97X-UD5H-BK MSI Gaming GTX 980 Kingston 32GB (4x8) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Beyerdynamic DT-770 Pro 250ohm Schiit Bifrost DAC Schiit Asgard 2 HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 128GB 1333MHz LSI 9271-8i 
OSPowerCase
VMware ESXi 5.5 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD Windows 10 Insider Preview 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › /= as Not Equal Equality.