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
#46754 - 02/14/14 11:17 AM Alpha Array?
KP_ABD Offline
OL Newbie

Registered: 12/12/13
Posts: 25
Hello,

I have a set of 60 alpha fields I want to sort based on a flag within that field, and I was considering an Array, but it seems that pres only allows numeric arrays, such that I cannot dump text into the array elements.

Is this something Pres can even do, or would it be something that can be added to Pres in the future?

Top
#46778 - 02/17/14 05:11 PM Re: Alpha Array? [Re: KP_ABD]
Jeff_K
Unregistered


Alpha arrays have been supported since v6.2.0.

Please contact support if you do not have this version or newer.

Top
#46905 - 02/25/14 02:50 PM Re: Alpha Array? [Re: ]
KP1 Offline
OL Newbie

Registered: 01/08/14
Posts: 3
Loc: wisconsin
Thanks Jeff, will do.

Top
#47105 - 03/13/14 12:28 PM Re: Alpha Array? [Re: KP1]
KP_ABD Offline
OL Newbie

Registered: 12/12/13
Posts: 25
Alpha Arrays are looking like they will have a lot of potential greatness for our use!

I have an issue I noticed with them so far, though.

TRFs do not seem to read in Array Elements as I would have thought they should. I may not be using it properly though.

I have an arrray:
Alpha Temp_Array[5] L20

In my code, I am populating the Array Elements with variable data.

let's say :
Temp_Array[0] = "$1.00"
Temp_Array[1] = "$2.00"

I have text similar to the below in a TRF:
Quote:
Please Donate ^Temp_Array[0]^ or even ^Temp_Array[1]^


then in my Pres layout:
Code:
TRFREAD "Filename.TRF", 1, txtBuffer
REPLACE txtBuffer,"^","^",'F'
WORDWRAP txtBuffer,NumLines,'L',6.5
MOVE txtBuffer L=$WrapLength


but the Array elements do not get replaced, and prints as:
Please Donate ^Temp_Array[0]^ or even ^Temp_Array[1]^

it should print like as below:
Please Donate $1.00 or even $2.00

Top
#47484 - 04/11/14 02:33 AM Re: Alpha Array? [Re: KP_ABD]
Gavin Offline
OL Newbie

Registered: 06/05/12
Posts: 14
Loc: Cape Town
Hi KP,

I have tested this on my side and here it is.

When doing the "Alpha Temp_Array[5] L20" please remove the "[""]" as Pres does not like this rather use "Alpha Temp_Array5 L20" the same for the Internal as well.

Your TRF should also read "TRFREAD "Filename.TRF", 0, txtBuffer" that is if you have it on record 1 of the TRF then it should be fine.

Here is mine, tested, working.
TRFREAD "Filename.TRF", 0, txtBuffer
REPLACE txtBuffer,"^","^",'F'
WORDWRAP txtBuffer,NumLines,'L',6.5
MOVE txtBuffer L=$WrapLength
txtBuffer=""

Hope this helps.

Regards,
Gavin

Top
#47645 - 04/25/14 05:24 PM Re: Alpha Array? [Re: Gavin]
KP_ABD Offline
OL Newbie

Registered: 12/12/13
Posts: 25
Originally Posted By: Gavin
When doing the "Alpha Temp_Array[5] L20" please remove the "[""]" as Pres does not like this rather use "Alpha Temp_Array5 L20" the same for the Internal as well.


This is only true for Pres versions prior to 6.2.0

Printsoft/OL added a new feature to Pres 6.2.0+ that allows the use of:

ALPHA Temp_Array[5] L20


Originally Posted By: Gavin
Your TRF should also read "TRFREAD "Filename.TRF", 0, txtBuffer" that is if you have it on record 1 of the TRF then it should be fine.


My problem is not reading in a TRF, I have no issues with that, we start with page one in the TRF’s because we use "page 0" in it as a Table of Contents.

Top