IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#30494 - 11/05/09 04:44 PM Adding Numbers using PressTalk
twlandry Offline
Member

Registered: 11/24/03
Posts: 42
Loc: Louisiana
Is it possible to add more than 2 numbers together using a press talk object? All I can find is add(expression1, expression2: integer) which only allows for 2 numbers to be added together... what If I have a list that needs to be added together? Is the PressTalk the right way to do this?

Top
#30495 - 11/05/09 04:45 PM Re: Adding Numbers using PressTalk
Anonymous
Unregistered


twlandry,

You can simply add them using the +, for example:

=&var1 + &var2

or

=23 + 543 + (21 - 4)

Hope this helps,
Eric.

Top
#30496 - 11/05/09 04:49 PM Re: Adding Numbers using PressTalk
twlandry Offline
Member

Registered: 11/24/03
Posts: 42
Loc: Louisiana
Quote:
Originally posted by Eric Lachance:
twlandry,

You can simply add them using the +, for example:

=&var1 + &var2

or

=23 + 543 + (21 - 4)

Hope this helps,
Eric.
Where do I type that, in the planet press talk code window?

Top
#30497 - 11/05/09 04:53 PM Re: Adding Numbers using PressTalk
Anonymous
Unregistered


twlandry,

Depends what you're trying to do, you haven't shown any of your code so it's hard to guess. Using the = means you can put that anywhere PressTalk is accepted. If you need any more precision, you're going to have to show us exactly what you're trying to do.

But basically, my point was, to add any 2 numerical values (int, float, measure), just add a + between them.

Make sure they are numerical though, as using + between 2 strings will concatenate them.

Hope this helps,
Eric.

Top