Return function?

Support forum for users of the M1 Build

Return function?

Postby kareltuning on Thu Mar 10, 2022 2:59 pm

Is there a return statement that allows me to exit an update code function?

For example:
Code execution enters Update Block:

if( testMode ) {
x = whatever;

// perform long calculation for X after this point

So that everything doesn't have to be wrapped in if-else statements...
Posts: 1
Joined: Sun Jan 30, 2022 5:41 am

Re: Return function?

Postby rntechnologies on Fri Jul 01, 2022 7:56 pm

Can you explain what you are trying to achieve?
Are you trying to optimise CPU usage? or are you trying to make your code neater?

There are a tonne of ways to achieve the same thing, remembering that the code that you write in build isn't the final code that goes to the ECU as it goes through the compiler.
User avatar
Pro User
Posts: 90
Joined: Tue Aug 07, 2018 8:45 am
Location: Australia

Return to M1 Build

Who is online

Users browsing this forum: No registered users and 1 guest