Re: Define macro

2025-01-17 Thread Ben Pfaff
I just used a text file viewer ("less") and that's what it showed. I'm attaching a version with the line ends changed to normal ones. I didn't check that PSPP accepts it, but there is a better chance of that. On Fri, Jan 17, 2025 at 10:45 AM Nanci Avitable wrote: > I forget exactly as I've been

Re: Define macro

2025-01-17 Thread Nanci Avitable
I forget exactly as I've been trying so many things. Most likely a cut and paste from the original email (Mozilla Thunderbird). I can try typing it in from scratch and seeing what happens. Is there something I can turn on to see that for myself? 

Re: Define macro

2025-01-17 Thread Ben Pfaff
Yeah, it's full of weird Unicode U+2028 Line Separator characters. Nanci, what did you use to create this file? It is a super weird text file that I would not expect any normal text editor to produce. [image: image.png] On Fri, Jan 17, 2025 at 10:20 AM Nanci Avitable wrote: > The attached Work

Re: Define macro

2025-01-17 Thread Nanci Avitable
The attached Workaround.sps is what I used based on Frans original suggestion just minus the Data List command. It's pretty much what you see in the output. On 1/17/25 11:02 AM, Ben Pfaff wrote: Those are good suggestions.

Re: Define macro

2025-01-17 Thread Nanci Avitable
Multiple possibilities to investigate. Right now need to prepare for a possible "Flash Freeze." Xcel, our power company, cannot guarantee power over the next 5 days. Thanks Frans for the suggestions. On 1/17/25 10:52 AM, Fra

Re: Define macro

2025-01-17 Thread Ben Pfaff
Those are good suggestions. Nanci, can you attach the syntax file, please? On Fri, Jan 17, 2025 at 9:53 AM Frans Houweling wrote: > Could it have to do with line endings or long lines, or character encoding > (like utf-32 instead of utf-8)? That is what "1.215-1.225" (row 1 columns > 215 to 225

Re: Define macro

2025-01-17 Thread Frans Houweling
Could it have to do with line endings or long lines, or character encoding (like utf-32 instead of utf-8)? That is what "1.215-1.225" (row 1 columns 215 to 225) and | ^~~ suggest to me. On 1/17/25 18:31, Nanci Avitable wrote: I'm afraid there might be something else going on which ma

Re: Define macro

2025-01-17 Thread Nanci Avitable
I'm afraid there might be something else going on which may have to do with the fact that this is actually an intel based program and I'm running it on a Mac silicon with Rosetta 2 installed. Rosetta is what enables silicon Macs to run intell programs, the

Re: Define macro

2025-01-16 Thread fhouweling
Don't worry about the DATA LIST: just replace the define.. !enddefine part in your syntax. The DATA LIST and what follows was just there to show the macro works.Il 16 gen 2025 23:05, Nanci Avitable ha scritto: Frans, Thank you. I suspected that there might be a problem with Do

Re: Define macro

2025-01-16 Thread Nanci Avitable
Frans, Thank you. I suspected that there might be a problem with Do Repeat. I have tried your syntax, but it is not working as expected. I wonder if there is a difference in the PSPP programs we are using. Mine did not like the Da

Re: Define macro

2025-01-16 Thread Ben Pfaff
It looks like I haven't tested !DEFINE with DO REPEAT, even though I remember doing that. There aren't any tests that exercise them together. On Thu, Jan 16, 2025 at 12:30 PM Frans Houweling wrote: > > I'm afraid DO REPEAT does not work well inside DEFINE. Here is a workaround: > > define !subsco

Re: Define macro

2025-01-16 Thread Frans Houweling
I'm afraid DO REPEAT does not work well inside DEFINE. Here is a workaround: define !subscore3 (!pos !tokens(1)/!pos !enclose('(',')')/!pos !tokens(1)) !LET !limits = !2 !DO !ssc = 1 !TO 19   !LET !limit = !HEAD(!limits)   !LET !limits = !TAIL(!limits)   if (!1 ge !limit) !3 = !ssc. !DOEND !endde

Re: Define macro

2025-01-16 Thread Ben Pfaff
What was the original syntax? On Thu, Jan 16, 2025 at 10:16 AM Nanci Avitable wrote: > > I am working on a new MacBookPro, M4 chip with Sequoia. I have downloaded and > installed the PSPP version 2.0.1-2 bundle. > > I have several SPSS programs that I use to score some protocols and output > in

Re: Define macro

2025-01-16 Thread Oren Ish-Shalom
Maybe like this: DO REPEAT ssc = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 / limit = 0 10 14 18 22 26 30 34 38 42 46 49 52 55 58 62 65 100 100. IF (ctraw >= limit) ct = ssc. END REPEAT. EXECUTE. On Thu, 16 Jan 2025 at 20:16, Nanci Avitable wrote: > I am working on a new MacBookPro, M4 c