Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Problems with global definition

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-16-2019
11:47 AM

12-16-2019
11:47 AM

Hi ptc community, I would like to make the following arrangement:

c="aply"

a:5

b:3

c**≡**if(a>b,"aply","does not aply")

Is there any way to place a result of verification of several variables before said verification?

I know that the global definition makes two passes: in the first pass, it evaluates only the global definitions and dismisses all the regular definitions but it would not be great if in the first pass it evaluates the global definitions taking into account the regular definitions that are before this global definition so that in the second pass not have this problem?

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2019
09:30 AM

12-17-2019
09:30 AM

FredKohlhepp thank you for your response but what I am looking for is to place the result at the top.

Werner_E thanks for your response, well it seems that it is not possible in this version thanks anyway

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-16-2019
12:28 PM

12-16-2019
12:28 PM

Re: Problems with global definition

May I suggest using a function:

That way you have a reusable test. Global variables should be avoided when possible and used sparingly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-16-2019
12:32 PM

12-16-2019
12:32 PM

Re: Problems with global definition

@LemnosOreoda wrote:

Hi ptc community, I would like to make the following arrangement:

c="aply"

a:5

b:3

c

≡if(a>b,"aply","does not aply")

Is there any way to place a result of verification of several variables before said verification?

I know that the global definition makes two passes: in the first pass, it evaluates only the global definitions and dismisses all the regular definitions but it would not be great if in the first pass it evaluates the global definitions taking into account the regular definitions that are before this global definition so that in the second pass not have this problem?

As you have found out yourself, the global definition can only be used with constants, so what you tried must fail.

There is no way to put results on top (maybe with the exception of scripted components which are available in Mathcad 15 an below, but not in Prime).

One way I could think of is to hide the calculation in a collapsed region so it just looks like the worksheet starts with the results.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2019
09:30 AM

12-17-2019
09:30 AM

FredKohlhepp thank you for your response but what I am looking for is to place the result at the top.

Werner_E thanks for your response, well it seems that it is not possible in this version thanks anyway