Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Joe Cahill  
#1 Posted : 08 August 2022 03:08:20(UTC)
Joe Cahill


Rank: Member

Groups: Registered
Joined: 23/03/2021(UTC)
Posts: 11
United States
Location: Austin TX

Sorry if this has been addressed before, if so simply point me there, my several searches did not turn up anything,

In writing programs I often find I need to create statements above statements I've already written, and I don't know how to provoke an empy statement placeholder inside an existing line structure.

I've been getting the function I want by having nested line structures, where the nesting is functionally meaningless, just a way to workaround my ignorance of the right way.

Thanks Joe

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline MarB  
#2 Posted : 08 August 2022 10:26:44(UTC)
MarB


Rank: Advanced Member

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 84

Was thanked: 21 time(s) in 17 post(s)
Just use the argument divider (comma or semicolon, dependent on the settings) while the cursor is at the appropriate position (line beginning or ending).
thanks 1 user thanked MarB for this useful post.
on 08/08/2022(UTC)
Offline Kenny Lemens  
#3 Posted : 08 August 2022 17:56:02(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 131
Man
United States
Location: Wisconsin

Was thanked: 58 time(s) in 37 post(s)
Originally Posted by: MarB Go to Quoted Post
Just use the argument divider (comma or semicolon, dependent on the settings) while the cursor is at the appropriate position (line beginning or ending).


Below is a picture with regards to MarB's instructions. In addition, there is the ability to click'n-drag the statement to increase the number of line items:

. . . SMATH_insertLine.jpg

Hope this helps,
- Kenny Lemens, P.E.
"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
thanks 1 user thanked Kenny Lemens for this useful post.
on 08/08/2022(UTC)
Offline Joe Cahill  
#4 Posted : 08 August 2022 18:21:15(UTC)
Joe Cahill


Rank: Member

Groups: Registered
Joined: 23/03/2021(UTC)
Posts: 11
United States
Location: Austin TX

It worked, thank you all.

I've attamept to attach the problem example that Jean Giraud suggested would be helpful, along with the illustration of the solution that MarB and Kenny Lemens described, but my attempts appear to fail. Sorry.

debug example - statement insertion in a line structure.sm (21kb) downloaded 19 time(s).
Offline Joe Cahill  
#5 Posted : 08 August 2022 18:23:03(UTC)
Joe Cahill


Rank: Member

Groups: Registered
Joined: 23/03/2021(UTC)
Posts: 11
United States
Location: Austin TX

I guess the attempts worked, in spite of the flashing red message.
Offline Joe Cahill  
#6 Posted : 09 August 2022 00:39:11(UTC)
Joe Cahill


Rank: Member

Groups: Registered
Joined: 23/03/2021(UTC)
Posts: 11
United States
Location: Austin TX

Hmmm, interesting.

Here's a screen snap of it open with the version of SMath Studio shown also and a pdf ->



debug example - statement insertion in a line structure.pdf (115kb) downloaded 8 time(s).

Edited by moderator 09 August 2022 14:58:47(UTC)  | Reason: large images moved into spoilers

Offline Joe Cahill  
#7 Posted : 09 August 2022 00:42:19(UTC)
Joe Cahill


Rank: Member

Groups: Registered
Joined: 23/03/2021(UTC)
Posts: 11
United States
Location: Austin TX

As an afterthought, I downloaded the file I uploaded and it opened on my laptop with my installation of SMath Studio.
Offline Jean Giraud  
#8 Posted : 09 August 2022 16:12:23(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Hello, Joe.
Your 'while' loop may be short of productive ! ?
Maybe not a case of 'while', rather a cumulative.
Cheers ... Jean.

Page39 Joe.sm (42kb) downloaded 6 time(s).
Offline Joe Cahill  
#9 Posted : 10 August 2022 00:27:02(UTC)
Joe Cahill


Rank: Member

Groups: Registered
Joined: 23/03/2021(UTC)
Posts: 11
United States
Location: Austin TX

True Jean, Thanks. As a contrived example it has no further existence in a productive worksheet of mine.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.