Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

84
Vistas
print(~(123 >> 1)) outputs -62 on Dart Mobile but outputs 4294967234 on Dart Web

I narrowed down my question from Same dart code outputs different result on Web and Mobile to this single line of code

print(~(123 >> 1));

Why does this print -62 on Dart mobile and 4294967234 on Dart web

What is the workaround or correct solution to make the same code "multiplatform"

Edit

~ // what is this operator ? this is the route cause I guess
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Solved . Replaced the ~ with

 // This is equivalent to the bitwise NOT operator ~ 
  // However, this outputs a wrong a value on web,
  // so we do it manually
  static int bitwiseNot(int x) {
    return -x - 1;
  }
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda