---
title: "Discussion on \"Adding very long integers with brightScript\" | Hashnode"
description: "Discussion on \"Adding very long integers with brightScript\". function longAdd( a$, b$ ) as string\n    result$ = \"\"\n    carry = 0\n\n    a$ = a$.trim()\n    b$ = b$.trim()\n\n    ' Guess longest\n    diff = abs( b$.len() - a$.len() )\n    longest = a$.len()\n\n    ' is it longest\n    if b$.len() > longest then\n        l..."
url: "https://hashnode.com/posts/adding-very-long-integers-with-brightscript/6474b8b5e683594104a338b6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Adding very long integers with brightScript](https://blog.brightscripters.com/adding-very-long-integers-with-brightscript?utm_source=hashnode&utm_medium=feed)

function longAdd( a$, b$ ) as string result$ = "" carry = 0 a$ = a$.trim() b$ = b$.trim() ' Guess longest diff = abs( b$.len() - a$.len() ) longest = a$.len() ' is it longest if b$.len() > longest then l...

May 29, 2023 · 1 min read · blog.brightscripters.com  
Read the article

-   [#brightscript](https://hashnode.com/tag/brightscript)

## Written by

[Bright Scripters](https://hashnode.com/@BrightScripters)

@BrightScripters · USA

  
[View profile](https://hashnode.com/@BrightScripters)

Taking BrightSign programming to the next level

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
