Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

30
LINES

< > BotCompany Repo | #1025199 // Embedded function test

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (6823L/48K).

!7

/*
sS bla() {
  S x = "hello";
  
  embedded S calc() {
    ret x + " " + x;
  }
  
  ret calc() + " " + calc();
}
*/

sS bla() {
  S x = "hello";
  
  class Temp {
    S calc() {
      ret x + " " + x;
    }
  }
  new Temp temp;
  
  ret temp.calc() + " " + temp.calc();
}

p-exp {
  print(bla());
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025199
Snippet name: Embedded function test
Eternal ID of this version: #1025199/4
Text MD5: 27fcb13afa8f91d6ed768a8973d5fa02
Transpilation MD5: 2ab3a9181fe77b216c519df2881b82ed
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-13 12:47:34
Source code size: 333 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 435 / 1135
Version history: 3 change(s)
Referenced in: [show references]