Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
English (US)
US English (US)
DE German
CN Chinese
MX Spanish (Mexico)
Chinese (Simplified)
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Discontinued Products (Crown) Software (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • Flux::
    Immersive Processing Analysis Subscriptions
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • AMX
  • Programming (AMX)
  • Programming

Long Variable Not Getting Assigned Correctly Through Math Operation

Written by Peter Stauber

Updated at January 14th, 2026

Table of Contents

Symptoms Cause Resolution

Symptoms

Two numbers are multiplied that should result in a value greater than 65,535 and are assigned to a LONG variable. The result is incorrect and always less than 65,536.

Example:

DEFINE_VARIABLE

long A_LONG_NUMBER

DEFINE_EVENT

BUTTON_EVENT[128,1]

{

 PUSH:

 {

   A_LONG_NUMBER = (360 * 1000) // result is 32320, should be 3600000

 }

}


Cause

This is a compiler bug, constant multiplication is not casting properly. Since constants are integers, the result the compiler used is an integer and data is lost.


Resolution

The interpreter works properly, so move constants to the variable section, and it will work.

DEFINE_VARIABLE

long A_LONG_NUMBER

integer X = 360

integer Y = 1000

DEFINE_EVENT

 

BUTTON_EVENT[128,1]

{

 PUSH:

 {

   A_LONG_NUMBER = (X * Y) // result is 3600000

 }

}


 

Related Videos

scheme format

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

Symptoms Cause Resolution

Related Articles

  • Controlling MUSE Serial Ports with Python Code

Related Articles

  • Controlling MUSE Serial Ports with Python Code
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand