You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/11/04 08:40:56 UTC

[GitHub] [incubator-nuttx-apps] cocoacrumbs opened a new pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

cocoacrumbs opened a new pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875


   ## Summary
   As a newbie, I thought trying out the BAS interpreter to be a nice first step. But when I issued a 'list' command to see the short BASIC program I wrote, I got an "Error: Break at: end of program" after printing the first line.
   
   This seems to be a side effect of cleaning up the BAS code to conform to the NuttX coding style. In the 'Program_list()' function (bas_program.c:714), this line:
   
         if (watchIntr && FS_intr) return Value_new_ERROR(value,BREAK);
   
   is changed to (removing the 'FS_intr' variable):
   
             if (watchIntr)
                {
                  return Value_new_ERROR(value, BREAK);
                }
   
   At runtime, 'watchIntr' evaluates to 1 by the caller ('channel == STDCHANNEL') when using 'list' at the prompt. Hence, the above 'if' always triggers and listing ends with an error after printing the first line.
   
   In the original code, 'FS_intr' is 0 (false) as long as the user didn't interrupt the printing out the code. But since this 'FS_intr' is gone, 'if (watchIntr)' now always evaluates to 'true' while this used to be always 'false' unless the user interrupted the printing of a listing.
   
   Since 'FS_intr' is nowhere to be seen anywhere else in the BAS code (because of the cleanup effort to conform to the NuttX coding style?) I thought it was best to completely remove this if statement instead of out commenting it.
   
   ## Impact
   Using 'list' at the BAS prompt now works and doesn't return a confusing 'Error: Break at: end of program' error.
   
   ## Testing
   I ran the "git diff --name-only master | egrep "\.c|\.h" | xargs echo | xargs ./tools/checkpatch.sh -f | less" command line. No warnings/errors were shown.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] cocoacrumbs commented on pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
cocoacrumbs commented on pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875#issuecomment-961255347


   Hi,
   
   My understanding is that the reported "Mixed case identifier found" errors can't be avoided for now since the source code for BAS has only been partly updated to comply to the NuttX coding style when it was added to the Apps repo. Tackling this is out of the scope of this fix unfortunately.
   
   Koen


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875#issuecomment-961323775


   Yes, "Mixed case identifier found" could be ignored in the old code base.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875#issuecomment-961323775






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] cocoacrumbs commented on pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
cocoacrumbs commented on pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875#issuecomment-961255347


   Hi,
   
   My understanding is that the reported "Mixed case identifier found" errors can't be avoided for now since the source code for BAS has only been partly updated to comply to the NuttX coding style when it was added to the Apps repo. Tackling this is out of the scope of this fix unfortunately.
   
   Koen


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #875: Fixes BAS list 'Error: Break at: end of program' error.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #875:
URL: https://github.com/apache/incubator-nuttx-apps/pull/875


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org